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 |
|
magmo
Aged Yak Warrior
558 Posts |
Posted - 2010-02-21 : 03:07:13
|
| HiI have the need to execute another stored procedure/view from within an exsisting stored procedure, and I need to pass on 3 parameters to that stored procedure. Lets say I return a result from stored procedure 1 like this..Model SectionID PartNumber OrderRow 1 22 111-22 10 1 22 222-33 20Here I want to pass "model","SectionID" and "OrderRow" to another stored procedure. But here is another problem, that stored procedure can return multiple rows and I want thoose rows as one single result. So if stored procedure number 2 return a result like this...ID Notes1 first note2 second noteI only want one row as result that contains both rows concantenated.Can someone show how to do this, if possible at all? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-21 : 03:21:15
|
| b/w is it possible to turn one of procedure or both to udfs?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2010-02-21 : 03:56:58
|
| [You posted in SQL 2005 forum but:] in SQL 2008 you could pass an @TableVar (as a parameter) to the second Sproc - i.e. in Sproc1 store results into @TableVar and then pass that as Param to SProc2 |
 |
|
|
magmo
Aged Yak Warrior
558 Posts |
Posted - 2010-02-21 : 04:18:34
|
| Ok, I guess I can solve on the client instead, thanks for the replies |
 |
|
|
|
|
|