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 =  #prompt(‘p_reportdate’)#

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


few other related articles

How to dynamically name tabs in excel 2007

When we use page set, report output in excel will have tab names as page1, pag1_2, page1_3, so on..

If you want to display this tab names by report section names then follow below configuration methods.

In cognos configuration settings at Report service for each dispatcher add below advanced settings


Value column, type-  TRUE