problem with OUTPUT params in Stored procedure

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jon

    problem with OUTPUT params in Stored procedure

    Hi all!
    Running the code below in SQL-analyzeer (or through dbExpress) results in NULL.
    As one might guess I would like the result to be 1. What is wrong? I.e, why
    wont the result of the SP come back to the caller?




    CREATE PROCEDURE test
    @val INTEGER OUT
    AS
    SELECT @val = 1
    GO

    DECLARE @val INTEGER
    EXEC test @val
    SELECT @val
  • Simon Hayes

    #2
    Re: problem with OUTPUT params in Stored procedure

    EXEC test @val OUTPUT

    Simon

    Comment

    Working...