Let me explain... I have one table which has a column that contains a delimited list of numbers which need to be used to return data from another table. (Don't ask, I did not design this!). EG:
Set @DelimitedList = (Select stupid_column from Table_One)
This results in @DelimitedList containing '1,2,3'; I then want to use this in a 'Where' clause for a subsequent query... i.e
Select * from Table_Two where int_column in (@DelimitedList)
Sadly this does not work as SQL tries to convert @DelimitedList to an integer which fails. Is there some way I can 'cast' or 'convert' my string list into an integer array?
Many thanks in advance