Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SP parameter use = '' or NULL ?
Message
From
03/08/2005 22:23:13
 
 
To
02/08/2005 02:08:36
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
01036110
Message ID:
01038404
Views:
20
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform