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?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…