sherbug1015
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','3 00,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.
Create Procedure Test @date1 datetime, @date2 datetime, @stores varchar(300)
The parameters will come in like this:
'10/1/2013','10/2/2013','3
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Yes, it covers a lot of useful ground. Kudos goes to angelIII really.
Thanks for the grade. Cheers, Paul
Thanks for the grade. Cheers, Paul
ASKER