COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: obieeky on 10 Sep 2014 01:55:46 PM

Title: unable to see SQL for view/query
Post by: obieeky on 10 Sep 2014 01:55:46 PM
Hello All,

I am trying to understand an existing Cognos report for a requirement analysis. There is a query " qryCurrentQuarter" which is referenced to other objects. I am unable to figure out where was this query written and how to I see the underlying SQL for this query.I am attaching few screenshots for any one to get a better idea to help me.

qryCurrentQuarter is not a database table or view....but here the developer used it as a table referencing objects.I would like to know how was this created. In the attchment included i can see SQL for
prevQueryQuarter....but not for other 2 queries which are combined(qryPreviousquarterdetails, qryPreviousqtrdate)
Any inputs are greatly appreciated.

Thanks.
Title: Re: unable to see SQL for view/query
Post by: bdbits on 11 Sep 2014 11:24:05 AM
You can see the generated SQL with menu item Tools > Show Generated SQL/MDX.

It looks to be a common Report Studio query. Open the Query Explorer or use menu item View > Queries.

What you see in your attachment is not SQL, it is a report expression. Do you understand how Cognos works? You do not generally reference database tables or views directly, you reference data items via metadata from packages. Unless you are using cubes, the package will have been created with Framework Manager, which in turn references the original source of the data (most often but not always a database).