Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing arguments by reference
Message
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
00941576
Message ID:
00941587
Views:
10
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--
Previous
Reply
Map
View

Click here to load this message in the networking platform