Tuesday, April 16, 2013

Working with NULLS in your CASE statement

Lately I've been trying to focus more on database administration (DBA) techniques and how to improve my work.  I've signed up for a few Microsoft SQL Server websites and try to learn something new each day by reading their articles.  Today I came across the following link and am proud to know that I came up with this method for dealing with NULLs long before this article was written:

Writing CASE expressions properly when NULLs are involved

My situation was much like this persons: I went to investigate why a stored procedure wasn't returning values as I expected.  Once I jumped into the code, I found that the NULL in my case wasn't being recognized.  This is the best way to deal with that situation.

No comments:

Post a Comment