COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Canata_013 on 03 Mar 2011 12:24:10 AM

Title: Using SQL Syntax query with Prompt
Post by: Canata_013 on 03 Mar 2011 12:24:10 AM
Hi to All,

   I am just in a hurry and has no time reading other post.
   I am developing a report in Report Studio.. My question is, is there a way in SQL Query using Native SQL Syntax where in we can use a filter other than Prompts? Please see below.

    >> SELECT SUM(SALES_AMOUNT)
         FROM SALES
         WHERE CUSTOMER = #prompt('prm_customer')#
    >>

    This works fine in SQL Query.


    Is there a technique where in I can filter my SQL Query which will depend on another query in my published package? Please see below again:

  >>SELECT SUM(SALES_AMOUNT)
       FROM SALES
       WHERE CUSTOMER = #[Layer1].[SALES].[CUSTOMER]#

    I'm thinking of something like that.. Is that possbile?? Can someone direct me to other links/post with common problem.

Thanks,
Alvin

 


 






Title: Re: Using SQL Syntax query with Prompt
Post by: d_idaho on 23 May 2011 06:12:58 PM
Hi Alvin, I have exactly the same problem. Did you find any solution ?
Title: Re: Using SQL Syntax query with Prompt
Post by: cognostechie on 23 May 2011 06:35:48 PM
Create an inner join , create a Model Query subject , create a filter in the MQS to force the join.