I have a stored procedure in which I have called another stored procedure [Let say I have parent stored procedure which is calling child SP]. Child stored procedure have a result set which have almost 10,000 records. How can I get it in the parent stored procedure?
Parent SP
(
Student INT
Teacher INT
Name Varchar
)
Child SP [Get Student specific activities] Student
-- Result Set of Child SP needed Here
-- End of Parent SP
One was is to use
INSERT... EXECUTE...Within the parent stored procedure, have something like:The (single!) data set returned by the child SP must match the table structure of #Temp.