Cognos – pass prompt value to SQL query

To pass a prompt value say – “p_reportdate” to sql query then syntax is as below
select * from table1 where table1.date =  #prompt(‘p_reportdate’)#

if the prompt- “p_name” is multi select then
select * from table2 where table2.name in (#promptmany(‘p_name’)# )
 

 

few other related articles
http://www-01.ibm.com/support/docview.wss?uid=swg21341148

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s