My Code:
declare @text as nvarchar(max)
set @text=N'''ABC'',''XYZ'',''MNO'',''PQR'''
print @text
select * from table where column in(@text) --Line1
select * from table where column in('ABC','XYZ','MNO','PQR') --Line2
Executing Line1 and Line2 gives different results. Line2 is working fine but not able to execute Line1. Can anyone help me out in the same. I want to execute Line1, as the list will be my parameter into Stored Procdure.