Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where of Int type column with coalesce
Message
 
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01437000
Message ID:
01437871
Views:
50
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform