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 ?


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.




 ? Strongly-typed dataset not retrieving return value from stored procedure
 ? SqlDataAdapter.FillSchema with stored procedure that has temporary table
 ? SQL Server Stored Procedure to insert selected data
 ? SQL Server stored procedure allows to insert into a table only numbers, not characters
 ? SqlDataAdapter.Fill(DataGridView.DataSource) duplicates all rows
 ? SqlDataAdapter.Fill(DataGridView.DataSource) duplicates all rows
 ? SqlDataAdapter.Fill(DataGridView.DataSource) duplicates all rows
 ? Datagridview - refresh after DB Update on another form
 ? figure out rowindex on a row I just inserted?
 ? DataGridView multiple row selection, specific column data get