Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
gamaz2
Starting Member
31 Posts |
Posted - 2008-12-14 : 11:03:23
|
Hi I have redefined my problem in a simple way:The data set obtained from a stored proc proc1 with input parameter @partnum is: projectno partno08-03520-00 E360MLID08-03267-01 E360MLID06-10595-03 E360MLIDNow I need to use the above set of data to a stored procedure proc2 with input parameter @projectno and @partnoand then get the result set.How does one do this in stored procedure where instead of passing @projectno and @partno three times and get three output corresponding to executing the secong procedure three times I want to execute the second procedure executed one time with the three sets of values and have one set of output.I appreciate any help to resolve this. Regards. |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-14 : 12:29:03
|
pass them as a xml parameter to second procedure or as a comma seperated list. then write logic in secomnd procedure to parse xml/comma seperated list and get result set corresponding to them. |
|
|
gamaz2
Starting Member
31 Posts |
Posted - 2008-12-14 : 12:48:59
|
Thanks visakh16 for the reply. This is the same proc. However I wanted to make the whole thing simplified so that it will be less confusing. The problem is that I have not worked with xml before. Is there any example link that is relevant to this issue you can post. That will be of immense help. Regards. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-14 : 12:55:30
|
http://vyaskn.tripod.com/passing_arrays_to_stored_procedures.htm |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
|
|