Pass a list of strings to a stored procedure SELECT. User.fields_i_want. FROM User. WHERE. User_id IN (SELECT User_id FROM Group_member WHERE Group_id IN (@Search_param)) ORDER BY User_id ASC. EXEC My_user_sp ''Group1', 'Group2', 'Group3''
There are, if I am honest, multiple problems with that SQL. USER
is a reserved keyword, IN
might as well be =
, and the OP is trying to pass three parameters, not one with delimited values... The query seems completely unrelated to the problem, and I suspect that with your signature, you're actually a bot account, so others please just ignore their bad advise.
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk