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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Actuate 8 (DB2 - CASE statement problem)?

Status
Not open for further replies.

5432167

Programmer
May 28, 2008
2
SI
Hello,

i'm having a problem with CASE statement...

How can i use PARAMETER inside CASE?

Example(DB2):

SELECT ( CASE :pARAMETER
WHEN 'N' THEN 'CODE 1'
WHEN 'P' THEN 'CODE 2'
WHEN 'R' THEN 'CODE 3'END) As Vsota,
...
...
FROM
...
...
WHERE
...
...


hope that u can help me ...
 
Found solution ... :)


CASE WHEN :pARAMETER = 'N' THEN 'CODE 1'
WHEN :pARAMETER = 'P' THEN 'CODE 2'
WHEN :pARAMETER = 'R' THEN 'CODE 3' END


thank you anyway
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top