I am writing a stored procedure where I want to select multiple IDs from one table where ids are found on another table from coma separated values (1,2,3,6).
This is what I am trying to write. But it is not working as expected.
SELECT [Name]
FROM [Table1] t1
INNER JOIN [Table2] t2 ON REPLACE(t1.[ID], ',', '') = t2.[ID]