Passing output Parameter to calling sp variable

  • could someone tell me how to do this.

    ----Inner sp--------------

    create proc test

    @out int output

    as

    select @out = 1

    select @out

    ----------------

     

    i want to assign the output param to a local variable  something like

    declare @i int

    set @i = exec test @out = 2

     

    Cheers for any help.

    Jules

     

    www.sql-library.com[/url]

  • Jules

    Is this what you're after?

    declare

    @i int

    exec test @out = @i output

    select @i

    John

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply