March 3, 2011 at 2:55 pm
Hi ,
I have to create a stored procedure which can have the following input paramter
userId
param1
param2
.
.
param13
Param1,param2,param3... are descriptions which user with userid would have selected.
Out of the 13 descriptions user will select max 3 or 4 .Its very rare user selecting more than 5.For each description I have to add a row in a Table .
The table desction for table A
id
userid
description
here the description is the params.There will be multiple rows corresponding to a userid if a user selected more than one description.
I am not sure whether I need all the 13 params or How do i handle this scenario.
Please help me
Thanks,
March 3, 2011 at 3:12 pm
I would either use a varchar(8000) variable and a comma delimited list (or any delimiter that will never ever be part of the parameter) and split it in the sproc using the split string function referenced in my signature or I would look into a table variable as a parameter (assuming you're on SS2K8).
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply