COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: inu on 22 Sep 2016 03:53:19 AM

Title: How to avoid the case statement in data item
Post by: inu on 22 Sep 2016 03:53:19 AM
Hi

There are 10s of data item , each of which having case statement... it means its applying on each row,.. degrading the performance..
Can we avoid this, is there any other solution ...

I really appreciate the response...

Regards,
Inam
Title: Re: How to avoid the case statement in data item
Post by: hespora on 22 Sep 2016 03:59:10 AM
If you do not want them on row level, create a subquery to your existing query and have the case statements in there. Then, they will run at aggregated level as is the output of your query.
Title: Re: How to avoid the case statement in data item
Post by: inu on 22 Sep 2016 04:15:41 AM
Quote from: hespora on 22 Sep 2016 03:59:10 AM
If you do not want them on row level, create a subquery to your existing query and have the case statements in there. Then, they will run at aggregated level as is the output of your query.


Thanks a lot...Can you please tell me how to create subquery in cognos report studio...

No idea , boss.


Regards,
Inam,
Title: Re: How to avoid the case statement in data item
Post by: hespora on 22 Sep 2016 06:31:20 AM
In your query explorer, click on queries. Now, drag a query item from your toolbox into the working area. Inside the working area, drag your existing query to the right of the newly created query.
Title: Re: How to avoid the case statement in data item
Post by: inu on 22 Sep 2016 07:55:20 AM
Quote from: hespora on 22 Sep 2016 06:31:20 AM
In your query explorer, click on queries. Now, drag a query item from your toolbox into the working area. Inside the working area, drag your existing query to the right of the newly created query.


Thanks, so will it create subquery? I just checked it ,,, not like that...


Regards,
Inam