I have a SQL stored procedure of the form
SELECT [fields] FROM [table] WHERE @whereSql
I want to pass the procedure an argument (@whereSql)
http://sqlmag.com/t-sql/passing-multivalued-variables-stored-procedure
try this it works!!
CHARINDEX (',' + ColumnName + ',', ',' + REPLACE(@Parameter, ' ', '') + ',') > 0
execute syntax set @Parameter= 'nc1,nc2'