Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 4729

return list of numbers in case statement for where condition

$
0
0

Hi

I would like to run a query like this :

select * from TABLEA where st in (case @StateOfEmpolyee when @StateOfEmpolyee in (17,41) then (41,17) else (13) end)

but it throws syntax error. 


Viewing all articles
Browse latest Browse all 4729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>