SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 What is the right way to pass multiple values in c
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

cplusplus
Aged Yak Warrior

532 Posts

Posted - 12/11/2012 :  06:22:46  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

India
2170 Posts

Posted - 12/11/2012 :  06:32:09  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000