I have a stored procedure that gets a parameter @IDsList, @IDsList is a varchar(1000) and it holds a list of IDs i.e. '1,2,3,4,5,6'
I would like to be able to use this list in this query:
Select stuff
From sometable where iID in (@IDsList)
But, I get this error: Syntax error converting the varchar value '1,2,3,4,5,6' to a column of data type int.
How can I do this?
Thank you.
I would like to be able to use this list in this query:
Select stuff
From sometable where iID in (@IDsList)
But, I get this error: Syntax error converting the varchar value '1,2,3,4,5,6' to a column of data type int.
How can I do this?
Thank you.