If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

How the SQL generated by cognos

Started by madhancog, 04 Mar 2010 04:28:09 AM

Previous topic - Next topic

madhancog

Hi Gurus,
  Can i know the difference of SQL generated by cognos for before aggregation and after aggregation,can any one give the SQL.


Thanks in advance
K.M

paddhu

Why don't you get it yourself. Here's how you can get that.
Go to Tools -> Show generated SQL/MDX

Gopinath

Hi,

The difference between before and after aggregation is exactly the same as WHERE and HAVING clause in SQL

say you have a table like

Scenario1 (Before aggregation)
Column1            Column2
A                       10
A                       20

Fileter Expression : Column1 > 10  and Application: Before auto aggregation

The result would be
Column1            Column2
A                         20

SQL would be like
select column1, sum(column2) from table where column2 > 10



Scenario2 (After aggregation)
Column1            Column2
A                       10
A                       20

Fileter Expression : Column1 > 10  and Application: After auto aggregation

The result would be

Column1            Column2
A                         30

SQL would be like
select column1, sum(column2) from table group by column1 having sum(column2) > 10




madhancog