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')# )
原文链接:https://tek-jedi.com/2017/06/19/cognos-pass-prompt-value-to-sql-query/