I have a a stored procedure that returns 2 result sets. I'm trying to call the stored procedure and insert the values of the first result set into a temporary table, but I am unable to do this because I'm returning 2 result sets.
Is there a way to return just one result set or both of them into seperate temporary tables. I am unable to change the stored procedure.
Stored procedure result set 1
column a | column b | coulmn c
Stored procedure result set 2
column x | column y
What I am doing is
DECLARE @ResultSet1Table
TABLE (
column a
,column b
,column c
)
INSERT INTO @ResultSet1Table
EXEC StoredProc
And receiveing the error message
Column name or number of supplied values does not match table definition
because of the second result set.