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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 accessing record of stored procedure?

Author  Topic 

HockeyFan
Starting Member

26 Posts

Posted - 2007-12-14 : 13:27:00
I'm writing a stored procedure that invokes several other stored procedures. I'd like to access the returned dataset from each, putting them into a temp table, and then work with the temp table from there.
So after I do the Exec, how do I access the returned dataset? How do I access the fields and/or iterate through the rows and get them into the temp table?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-12-14 : 14:08:03
CREATE TABLE #t1 (...)

INSERT INTO #t1
EXEC sp1...

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -