I have a string which contains a comma delimited list of id's which I want to use in a where clause.
How can I achieve this? Essentially I have:
set @ids = '5,8,14,5324,'
SELECT * FROM theTable WHERE Id IN (@ids)
but @ids is a varchar and Id is an int.
Any ideas much appreciated.