In SQL Server 2008, is there any way to get the total numbers of Result sets (tables) been populated after an execution of stored procedure.
Lets say I have one stored procedures which internally calls another stored procedure. I want to know that how many result sets it returns that internally called stored procedure.
Can anybody can assist me on this.
e.g.
CREATE PROCEDURE sp_GetReports
(
@reportName AS VARCHAR(50)
)
AS
BEGIN
DECLARE @reportProcName AS VARCHAR(50)
SELECT @reportProcName = ReportProcName
FROM ReportMaster
WHERE ReportName = @reportName;
EXEC (@reportProcName)
/*
* Need to get here, total numbers of Result Sets (tables) retrived.
*/
END
GO
Thanks in advance.