Showing posts with label allrunning. Show all posts
Showing posts with label allrunning. Show all posts

Monday, February 20, 2012

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 @.valEXEC test @.val OUTPUT

Simon