Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why empty string is returned as 0
Message
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01544288
Message ID:
01544289
Vues:
40
This message has been marked as the solution to the initial question of the thread.
A Return statement in SP supports only integer values

>I have a simple stored procedure that declares a variable @ErrorMessage at the top as
>
>declare @ErrorMessage AS VARCHAR(100)
>SET @ErrorMessage = ''
>
>
>At the end of the procedure I return this value as
>
>RETURN @ErrorMessage
>
>
>The value is set to the @ErrorMessage in CATCH block. Then I test this procesure in a query window as following
>
>declare @retval as varchar(100)
>EXECUTE @retval = myproced param1, param2
>print @retval
>
>
>But if there is no problem within the procedure, the value of @retval showing in the query window is 0 (zero). Why not empty string?
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform