Guys i have a stored procedure (SP1) which internally calls another stored procedure (SP2) which returns 2 result sets/ tables.
I need to handle that stored procedure (SP2) in the main stored procedure (SP1).
I have no idea from where to start
create procedure SP2 as
begin
select * from table 1
select * from table 2
end
create procedure sp1 as
begin
--need to store both the outputs from the below SP
exec sp2
end