I'm working on a stored procedure with a SELECT instruction, like:
SELECT ID FROM tblObjects WHERE (UserID IN (1, 3, 6, 10));
I want to set the values in the list (1, 3, 6 , 10) by one inputparameter
and I'm thinking of using a string, like "1, 3, 6, 10".
My question is:
How to "convert" this string to the list?
SELECT ID FROM tblObjects WHERE (UserID IN (@sFilter)) doesn't work because
the datatypes are not the same.
Maybe I'm on the wrong way and hopefully someone can get to the right path.