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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2003-06-17 : 07:36:09
|
| gaurav writes "Can i mention multiple option in case when statement. Say I want to check multiple values of a column and I don't want to write multiple when statement. Can i use single when keyword to mention all the option?" |
|
|
dsdeming
479 Posts |
Posted - 2003-06-17 : 08:32:05
|
| Do you mean something like this:CASE WHEN column1 = 1 AND column2 <> 2 THEN 0 WHEN column1 = 0 OR column2 = 2 THEN 1 WHEN column1 IN( 2, 3, 4 ) THEN 2ENDDennis |
 |
|
|
|
|
|