How do I loop through a VARCHAR(100) and remove the commas? Each ID should be used uniquely in the WHERE Clause.
Example:
DECLARE @Str VARCHAR(100);
SET @Str = "22,45,50,105,"
I need to use each unique ID in my WHERE Clause.
SELECT FROM Table1 WHERE ID = @Str <---- How do I loop through @Str remove the comma and use each ID uniquely?*