Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where of Int type column with coalesce
Message
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01437000
Message ID:
01437871
Vues:
49
This message has been marked as a message which has helped to the initial question of the thread.
>Are you saying that the Where clause I posted ("where Col_IntType = COALESCE(@param1, Col_IntType)" will not return records with NULL value? Why not? If @param1 is NULL than the expression will evaluate to Col_IntType = Col_IntType; and wouldn't it be always True regardless of the value in the field?

Read this excellent article for in depth discussion http://www.sommarskog.se/dyn-search-2008.html
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform