Link to home
Start Free TrialLog in
Avatar of vertige
vertige

asked on

stored procedure with list of values as parameter

I need to do a search using "in" and cannot pass a list of values to the procedure.

example:

create procedure get_users
@usernames varchar(20)
as
select * from users where user_name in @usernames

then I run exec get_users 'a,b,c,d' and get nothing.
SOLUTION
Avatar of Lee
Lee
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial