|
-
Jul 29th, 2008, 10:02 AM
#1
Thread Starter
Hyperactive Member
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.
-
Jul 30th, 2008, 01:59 PM
#2
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?
__________________
Rate the posts that helped you 
-
Jul 30th, 2008, 02:00 PM
#3
Re: Help with stored procedure
also check if you are getting same error when you run query from SQL Analyser?
__________________
Rate the posts that helped you 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|