SQL Sever 2008 use a variable in a WHERE IN clause
Posted
by CWinKY
on Stack Overflow
See other posts from Stack Overflow
or by CWinKY
Published on 2010-05-19T23:37:40Z
Indexed on
2010/05/19
23:40 UTC
Read the original article
Hit count: 248
Any updates in SQL 2008 to allow a variable for the IN of a where clause?
Declare @InParams varchar(100)
Set @InParams = '1,2'
Select * from Category
Where CategoryID in @InParams
© Stack Overflow or respective owner