Help with stored procedure
Hi I have a stored procedure, which calls another stored procedure and I´m asigning the result to a variable.
Something like this,..
Code:
Declare @num int;
ALTER PROCEDURE proc 1
BEGIN
exec @num = proc2
[Then do sth with @num]
Select * from table where id = @num
END
when I execute the procedure in the results I both get the value from the
exec @num = proc2 and the value from Select * from table where id = @num
I would like to asign the value of the stored procedure to @num, without it showing in the results when executing the procedure.
The reason is I and looping through results and it gave me this error:
The query has exceeded the maximum number of result sets that can be displayed in the results grid. Only the first 100 result sets are displayed in the grid.
Re: Help with stored procedure
try to change the result view to text mode by using pressing CTRL + T and see if you still have same problem?
Re: Help with stored procedure
also check if you are getting same error when you run query from SQL Analyser?