Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Null in where clause
Message
From
23/02/2001 08:18:59
 
 
To
22/02/2001 15:36:10
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00478555
Message ID:
00478766
Views:
28
I like the other option also. It has a much better chance of being optimized. I'm not sure if it will be but I'm pretty sure this version won't.

-Mike

>
WHERE ISNULL(mydatefield, '19000101') = ISNULL(@dateparm, '19000101')
>
>>
WHERE (@dateparm IS NOT NULL AND mydatefield = @dateparm)
>>   OR (@dateparm IS NULL     AND mydatefield IS NULL)
-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform