User
User

Reputation: 67

Insert data from stored procedure returning mutiple dataset into a temporary table in SQL Server 2008

My stored procedure returns more than one result set.

I want to get the data returned by the second select statement from the stored procedure and I want to insert that data in a temporary table in SQL Server 2008.

Any idea how to implement this ?

Upvotes: 1

Views: 702

Answers (1)

You can't access more than one result set in SQL Server. A couple of options though:

Split the stored procedures so only one result set it returned. Access the second result set using c#/vb/net data tables. Create a CLR to access the second result set.

HTH

C

Upvotes: 1

Related Questions