This is the code:
What I want to do is Select all the fields where ControlID in Z and Y. But no results come back.
Code:
DECLARE @ControlIDList nvarchar(4000)
SELECT @ControlIDList = '''Z'', ''Y'''
PRINT @ControlIDList
SELECt *
FROM TestTable
WHERE ControlID (' + @ControlIDList + ')
What I want to do is Select all the fields where ControlID in Z and Y. But no results come back.