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 |
|
8022421
Starting Member
45 Posts |
Posted - 2011-02-24 : 05:47:47
|
| Hi,I having a procedure1 which returns 3 resultsets,I am trying to execute procedure1 from procedure2, is it possible to hold the result sets from procedure1 and stor it in a temp table in procedure2. I am not supposed to change the procedure1.Is this is possible?ThanksDhana |
|
|
Ifor
Aged Yak Warrior
700 Posts |
Posted - 2011-02-24 : 06:20:26
|
| T-SQL cannot handle multple result sets from a sub-SP.If you cannot alter Procedure 1 then Procedure 2 will have to be a CLR procedure using ADO.NET to handle the result sets. It may just be simpler to do this in the middle tier. |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2011-02-24 : 09:11:49
|
quote: Originally posted by 8022421 Hi,I having a procedure1 which returns 3 resultsets,I am trying to execute procedure1 from procedure2, is it possible to hold the result sets from procedure1 and stor it in a temp table in procedure2. I am not supposed to change the procedure1.Is this is possible?ThanksDhana
Currently possible if all three resultsets are identical in datatype and number of columnsMadhivananFailing to plan is Planning to fail |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2011-02-24 : 11:12:29
|
It's still possible. You only need same number of columns.Make sure your destination table has a column datatype that can accomodate all resultsets. N 56°04'39.26"E 12°55'05.63" |
 |
|
|
|
|
|