COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: rajivgupta1107 on 19 Sep 2008 12:03:15 AM

Title: SQL and Query objects
Post by: rajivgupta1107 on 19 Sep 2008 12:03:15 AM
Hi All

I am using SQL object in my report for some sql query. The SQL is automatically giving its output to query:

Query <- SQL

I i see the generated SQL for the query , its something like this:

Select distinct sql1.col from (select col from table) sql1

But i want to display all the records , not the distince. Pls tell me.
Title: Re: SQL and Query objects
Post by: blom0344 on 19 Sep 2008 03:31:25 AM
If you only fetch one attribute, then Cognos is smart enough to understand that you do not want duplicates and adds a distinct to the SQL clause. Since you are just fetching one column value, why o why would you be interested in seeing duplicates? ???
Title: Re: SQL and Query objects
Post by: the_xxx on 19 Sep 2008 12:34:22 PM
Hi Rajiv...Just change the "Auto Group & Summarize" property of a query to No. You should be able to see all the roow :)