I have a stored procedure that does a select and returns 0 or more rows as a result.
How can I determine how many rows are returned from this stored procedure within another stored procedure?
thx
Printable View
I have a stored procedure that does a select and returns 0 or more rows as a result.
How can I determine how many rows are returned from this stored procedure within another stored procedure?
thx
Something like (although I haven't tested it) the following should work:
[This message has been edited by JHausmann (edited 09-07-1999).]Code:
CREATE PROCEDURE rows_returned
AS
DECLARE @printline as CHAR(80)
EXEC your_stored_procedure
select @printline = @@rowcount + " Rows selected"
PRINT @printline
Thanks, this works after putting a convert() around the @@rowcount when building the select for @printline.