In SQL Server 2008, is there a way to get the total number of result sets (tables) populated after the stored procedure is executed.
Suppose I have one stored procedure that internally calls another stored procedure. I want to know how many returned results an internally called stored procedure returns.
Can anyone help me on this.
eg.
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)
END
GO
Thanks in advance.
source
share