Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2002
    Posts
    192

    Unanswered: Using an Output Parameter

    I Have a Stored Procedure with an Output Parameter Defined say:

    CREATE PROCEDURE spTest

    @InputVar NVARCHAR(5)
    @outputVar NVARCHAR(10)

    AS

    SET @OutputVar = 'HI'

    GO

    If this SP (I.E. spTest) is called from within another stored procedure (Say spTestMain) how do I get this value out for use within spTestMain?

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

  3. #3
    Join Date
    Oct 2001
    Location
    England
    Posts
    426
    CREATE PROCEDURE spTest

    @InputVar NVARCHAR(5)
    @outputVar NVARCHAR(10) out
    as

    ...




    declare @s nvarchar(10)
    exec spTest 'help', @s out
    select @s

Posting Permissions

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