Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Null in where clause
Message
De
23/02/2001 08:18:59
 
 
À
22/02/2001 15:36:10
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00478555
Message ID:
00478766
Vues:
29
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform