|
|
Question : PL/SQL Case IN Statement - proper Syntax
|
|
Hello, I've writtenthe following Case Statement: CASE WHEN NameID in ('HA2', 'BCD1', 'DEF') THEN Name Else '' end I'm getting no data in the Name field thanks.
|
Answer : PL/SQL Case IN Statement - proper Syntax
|
|
the syntax is fine. what is the data type of the column NameID? if it is CHAR() with different from 3, then you should consider getting it changed to VARCHAR2() or
CASE WHEN rtrim(NameID) in ('HA2', 'BCD1', 'DEF') THEN Name Else '' end
|
|
|
|
|