Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass Cognos parameter to Manual SQL

Status
Not open for further replies.

dbe123

Technical User
Apr 3, 2009
10
GB
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
 
That is not a valid CASE statement. The WHEN and ELSE should return a value, not a DML statement. You can use imbedded SQL strings in a stored procedure but not in SQL itself.


Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top