I have this string that i am getting from .net application
A,B,C,D,E,F,
I wanted to write a sql select statement like
set @string = 'A,B,C,D,E,F'
select * from tbl_test
where tbl_test.code in (@string)
This wont work in t-SQL because it is using the @string as one string it is not separating the values. Is there any ways i can do this?
It think the easiest way to do it, will be, dynamic SQL generation: