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
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 ...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.