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 |
|
awk_grep
Starting Member
11 Posts |
Posted - 2007-12-14 : 14:10:00
|
| * I have posted this issue under Sql/Server 2000 as well.. but I am woreking on 2005...*I have two Stored Procedures. let say sp_a and Sp_b. Sp_a calls Sp_b using the EXEC... my issue is that Sp_B will produce a recordset, like 4 rows and 5 columns...How can I have the data from sp_b passed back to the calling SP..?here is some of the code..-----------------------------OPEN @cursor_varset @cnt = 0set @cnt = @cnt + 1while (@cnt <= @@cursor_rows)beginfetch next from @cursor_var into @emp_loop_id , @daytimeexec SP_B @emp_loop_id,'10/22/2007' ,@emp_id_out output , @total_time_perday outputset @cnt = @cnt + 1end--------------------Once the SP_B is called , the SP_B will create a record set the result from calling SP_B is 4 records or 5 records.How can I get a record set back from calling SP_B? If I call the SP_B by itself , it will return 4 rows and 5 columns How can I get these results back from calling EXEC SP_B? can it be done? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-12-14 : 14:20:04
|
| Locking this duplicate thread. Will move the other thread to the 2005 forum.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
|
|
|