I have a column in database that stores an array of numbers in a nvarchar string and the values look like this
"1,5,67,122"
Now, I'd like to use that column value in a query that utilizes IN statement
However, if I have something like
WHERE columnID IN (@varsArray);
it doesn't work as it sees @varsArray as a string and can't compare it to columnID
which is of INT type.
how can I convert that variable to something that could be used with a IN statement?