Is there a way to pass a comma separated list as a parameter in a where clause? I am taking a basic comma separated list 'aaa, bbb, ccc' and formatting it in the way that would appear when using in ('aaa', 'bbb', 'ccc') and setting that string as a parameter.If I just do a select @items I get 'aaa', 'bbb', 'ccc' which is what I would expect.However...--Does not workSELECT *FROM items WHERE itemCode IN (@items)--WorksSELECT *FROM items WHERE itemCode IN ('aaa', 'bbb', 'ccc')
↧