Click here to Skip to main content
15,891,828 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I am having stored procedure which will return two result set and i am calling this stored procedure into another stored procedure .
is there any way to stored the second result set into table variable
Posted

why not use a view instead of a stored procedure for the first one?
 
Share this answer
 
Comments
Sachin MCA2012 22-Jun-15 11:55am    
my stored procedure contain various filter and in first result set it will show only the selected filter data.
and in second result set contain all the fields (ie selected + unselected)
stored procedure is about 2000 lines
please help
SELECT INTO #temptable FROM OPENROWSET (connectionstring/storedproc)

http://stackoverflow.com/questions/653714/insert-results-of-a-stored-procedure-into-a-temporary-table[^]

please see above link for better examples and a few other ideas, OPENROWSET may not be the best in terms of speed.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900