Yes, you got it. :)
I would code checks little bit differently for readability.
IF @VALUE IS NULL
SET @VALUE = 0
ELSE
SET @VALUE = @VALUE + 1
>Thanks again Sergey for your appreciated quick reply ;-)
>
>Yes it's actually what I want to do, pass a variable that already contains a value, modify it and return it to the caller.
>
>So If I understand you, I could:
>
>USP_O_MYPROC @VALUE INT OUTPUT
>...
>...
>SET @VALUE = @VALUE + 1
>IF @VALUE IS NULL SET @VALUE = 0
>RETURN
>
>
>When I call the SP, I simply do:
>SET @tata = 120
>EXEC USP_O_MYPROC @tata OUTPUT
>-- @tata should now be 121...
>
>
--sb--