Skip to content Skip to sidebar Skip to footer

Multiple Criteria In Case Statement

I know you can do a 1 to 1 relationship in a case statement like such Select case userID when '12345' Then '12' Else userID End from userInformation and I don't think you can add

Solution 1:

Use a slightly different syntax:

 Select case WHEN userID = '12345' And status = 'Active' Then '12' Else userID End 
 from userInformation

Post a Comment for "Multiple Criteria In Case Statement"