I have this IF statement in my Stored Procedure:
if ((@someParam = 'C') OR (@someParam = 'I' AND @SomeOtherParam <> 2 AND @SomeOtherParam <> 4 AND @SomeOtherParam <> 5))
My question is can I check @SomeOtherParam in one shot, instead of having to check it 3 separate times?
This should do the trick:
INtakes a list of values, and returns true if your value is found in the list. AddingNOTmeans that it will return true if your value is not found.