I’m doing a bunch of sum queries:
SELECT col1 + col2 + col3 + ...
Some of the values in some of the columns are null. I’m checking for them by doing:
SELECT CASE WHEN col1 is not null and col2 is not null and ...
I wonder if there is a more concise syntax for accomplishing this task.
Well, since the sum of any number and
nullisnull, you can do something like the following (with the obvious...filled in):