COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: cassinium on 18 Sep 2017 07:51:08 PM

Title: Passing existing parameter to Pass-Through SQL Query
Post by: cassinium on 18 Sep 2017 07:51:08 PM
My report has multi-select checkbox prompt for Business Division.  With a normal query, I would simply use "IN ?BusinessDivision?" in the filter.  How do I use this existing parameter in a Pass-Through SQL query?  I tried putting "IN #?BusinessDivision?# in the WHERE clause, but that does not work.  I get a validation error. Any ideas?  I'm on Cognos 11.0.7.
Title: Re: Passing existing parameter to Pass-Through SQL Query
Post by: CognosPaul on 19 Sep 2017 05:08:53 PM
Question marks denote a prompt alias which only works in regular query expressions. For SQL you need to use macro expressions.

?BusinessDivision? can become (#promptmany('BusinessDivision','integer')#)