May 4, 2006 at 7:11 am
Hey guys. Does anyone know how I can use case select in a stored procedure to check for multiple criteria in a table? Here is an example of what I'm trying to do.
CASE ClientBoxNumber WHEN '0096028' OR '0096076' THEN '0096064' END
What is the correct syntax?
May 4, 2006 at 7:48 am
(CASE
WHEN CLIENTBOXNUMBER IN ('0096028', '0096076') THEN '0096064'
ELSE ''
END)
May 4, 2006 at 6:21 pm
rharma...was spot on...but just wanna make things perfect...
SELECT CASE WHEN CLIENTBOXNUMBER IN ('0096028', '0096076')
THEN '0096064'
May 4, 2006 at 6:23 pm
sorry mate pblm with backspace in my keyboard
SELECT CASE WHEN CLIENTBOXNUMBER IN ('0096028', '0096076')
THEN '0096064'
ELSE
END as 'ColumnName'
FROM TableName
May 6, 2006 at 5:03 am
Thanks guys!
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply