Results 1 to 3 of 3

Thread: Help with stored procedure

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2006
    Location
    Madrid
    Posts
    325

    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.

  2. #2
    Frenzied Member
    Join Date
    Jan 2006
    Posts
    1,875

    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

  3. #3
    Frenzied Member
    Join Date
    Jan 2006
    Posts
    1,875

    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
  •  



Click Here to Expand Forum to Full Width