Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SP parameter use = '' or NULL ?
Message
De
03/08/2005 22:23:13
 
 
À
02/08/2005 02:08:36
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
01036110
Message ID:
01038404
Vues:
19
>Hi,
> Seems i can not help you more,as tried your example,there are no
>such phenomena occurs,- it always returns correct result:- Len(@par1)=0.
> BTW,my environment is under SQL SP3.You can verify if this is
>caused with SP4.

Hi,

Thank a lot for your help.
You mean that your SP run okay with code like

CREATE PROCEDURE TestSP(@p1 char(10))
AS BEGIN

if(len(@p1) = 0)
print 'Empty parameter'
else
print 'Parmeter = '+@p1

END

I am using the SP4 of SQL Server 2000.
When I debug it using QA, it should that LEN(@p1) = 2
when I pass in TestSP ''. I am still wondering why
this is happening.
Best Regards
Virusim
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform