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 |
|
tiss0183
Starting Member
18 Posts |
Posted - 2008-06-02 : 17:43:54
|
| How can I use the data returned from a stored procedure within another stored procedure?For example, I trying to something along these lines:select * from tbl_Testunion allselect * from (exec sp_Test) |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-03 : 00:03:23
|
| Put the results of sp into a temporary tableCREATE TABLE #temp(fields same as resultset of sp)INSERT #tempEXEC sp_Testthen use it in UNION ALLselect * from tbl_Testunion allselect * from #TempMake sure sp_test returns the same number of columns and have same datatype as fields of tbl_Test |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|