Jim Horn
asked on
Syntax for CASE WHEN with multiple criteria
UPDATE #tmp
SET Product_Type = CASE plcy.PTYP_ID WHEN 4 OR 8 OR 11 OR 15 OR 16 OR 17) then 'B' else 'A' END
What's the correct syntax for CASE WHEN {multiple values} THEN {something} END?
TIA
-Jim
SET Product_Type = CASE plcy.PTYP_ID WHEN 4 OR 8 OR 11 OR 15 OR 16 OR 17) then 'B' else 'A' END
What's the correct syntax for CASE WHEN {multiple values} THEN {something} END?
TIA
-Jim
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>> 16 OR 17) then 'B' els
You had an unclosed paren in the original.
You had an unclosed paren in the original.
Glad to be of assistance. May all your days get brighter and brighter.
ASKER