DECLARE @strA VARCHAR(20) = '''1'',''2''' select * from tableA where ColA in ( @strA )
select * from tableA where ColA in ('1','2')
DECLARE @strA VARCHAR(20) = '''1'',''2''' DECLARE @sql NVARCHAR(MAX) = 'select * from tableA where ColA in (' + @strA + ')' EXEC sp_sqlexec @sql
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)