COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: cognos4321 on 10 Oct 2013 04:07:37 PM

Title: SQL query in report studio
Post by: cognos4321 on 10 Oct 2013 04:07:37 PM
Hi experts,
I am not able to relate with SQL queries we write while developing reports with those while I learnt SQL. Can you please tell me the difference or how to get hands on it. I learned SQL from w3schools.com.

Thanks in advance
Title: Re: SQL query in report studio
Post by: calson33 on 10 Oct 2013 04:57:50 PM
Are you sure you are using SQL in Cognos? It might be dimensional. It's a whole different way of thinking.

If it is SQL, What database are you using? Each one has slightly different syntax and features.

If you are unsure, post some of the code here (that does not show any proprietary information such as business names, passwords, IDs etc.).
Title: Re: SQL query in report studio
Post by: cognos4321 on 11 Oct 2013 01:09:15 PM
Hi calson, thanks for the reply.

I was doing the Demos in Go sales retailers package. I learnt SQL from "www.W3schools.com" but when they write queries in the Demos provided I cannot relate them to what I learnt.
So, do I need to learn SQL from somewhere else as well. Please guide
Title: Re: SQL query in report studio
Post by: bdbits on 14 Oct 2013 08:48:39 AM
If you are looking at the generated SQL through report studio, that is not the best way to learn SQL. In fact you really do not want to be writing SQL in Cognos at all. Cognos puts a layer of metadata over the database, based on a Framework Manager model. This makes it much simpler for users who more-or-less drag and drop fields onto their reports/queries/etc. Cognos uses the metadata layer to then construct the SQL. It will use techniques beyond basic, entry-level SQL, so you will get confused until you have a firmer grasp on SQL.