I have a saved .sql script that I run a few different queries on using a list an IN() statement and a list of strings like below
--SET A VARIABLE FOR THE LIST OF STRINGS
DECLARE @QLIST varchar(2000) = 'STRING1','STRING2','STRING3','STRING4'
WHERE qString IN (@QLIST)
ORDER BY PID
The problem I'm having is setting the actual @QLIST variable to be a comma delemited list with single quotes still surrounding each list item.
I searched around and didn't find what I'm looking for and thought one of the SQL experts here would have tried this before.
Thanks in advance!