COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: dbe on 30 Nov 2010 03:05:38 PM

Title: Pass Cognos parameter to Manual SQL -- Not working
Post by: dbe on 30 Nov 2010 03:05:38 PM
Hi,

Anyone can help me passing a Cognos Report Studio parameter (type string) to an SQL statement in the backend?

I found some information on this, on the www, but unfortunately, it doesn't work.

This is what I have so far:

CASE
   WHEN #promptmany('Parameter1')# IS NOT NULL
   THEN
        SELECT * FROM table WHERE field = #promptmany('Parameter1')#
   ELSE
        SELECT * FROM table
END

Our database system is Oracle, the Cognos BI version is 8.4
The error I get is 'Invalid SQL statement'

Thanks in advance