Results 1 to 2 of 2

Thread: Newbie Question

  1. #1
    Join Date
    Oct 2003
    Posts
    7

    Unanswered: Newbie Question

    Hi,
    I have a procedure that returns 5 different values. I want to run the procedure in another procedure and use those values in that procdure.

    How? How? How?

    CREATE Procedure get_Averages_EY @Quality dec OUTPUT, @Commitment dec OUTPUT,@Change dec OUTPUT, @Strategy dec OUTPUT, @Leadership dec OUTPUT, @Environment dec OUTPUT, @id int

    I want to use all of the output values in another procedure.

    Thanks!!!

  2. #2
    Join Date
    Jul 2002
    Location
    Village, MD
    Posts
    621
    Try this one.

    create procedure proc1(@id int,@id2 int output,@id3 int output)
    as
    set @id2=@id*2
    set @id3=@id*10
    go
    create procedure proc2
    as
    declare @id2 int,@id3 int,@id int
    set @id=3
    exec proc1 @id,@id2 output,@id3 output
    select @id,@id2,@id3
    go
    exec proc2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •