Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 What is the right way to pass multiple values in c

Author  Topic 

cplusplus
Aged Yak Warrior

567 Posts

Posted - 2012-12-11 : 06:22:46
I want to pass multiple values in Case when block in select query:
Can i do this way? WHEN 358,359,360 THEN 1

CASE PayorClass
WHEN 358,359,360 THEN 1
WHEN 362 THEN 2
ELSE 9
END as ProviderGender,

Thanks for the helpful info.

bandi
Master Smack Fu Yak Hacker

2242 Posts

Posted - 2012-12-11 : 06:32:09
CASE WHEN PayorClass IN (358,359,360) THEN 1
WHEN PayorClass = 362 THEN 2
ELSE 9
END as ProviderGender

--
Chandu
Go to Top of Page
   

- Advertisement -