Link to home
Start Free TrialLog in
Avatar of sherbug1015
sherbug1015Flag for United States of America

asked on

passing a comma delimited list into sql server

I need to create a stored procedure that will take 2 dates and a comma delimited list as parameters.  For example  

Create Procedure Test  @date1 datetime, @date2 datetime, @stores varchar(300)

The parameters will come in like this:

'10/1/2013','10/2/2013','300,400,500,600'

In my stored proc I will need to say

 where store number in(the values passed in as @stores)

I won't know in advance what values are going to be passed in @stores.  

Does anyone know how to put the values passed into the In() function?

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of PortletPaul
PortletPaul
Flag of Australia 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
Avatar of sherbug1015

ASKER

Great article.  Thanks.
Yes, it covers a lot of useful ground. Kudos goes to angelIII really.
Thanks for the grade. Cheers, Paul