Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing arguments by reference
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
00941576
Message ID:
00941587
Vues:
9
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--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform