|
I have this query everything was find until I added [Sum Soft Credit], for some people it is right but for some people I get nulls for life smallest amount or last amount randomly, what could this be?
(comments are locked)
|
|
You are doing a sum on the ammt but aren't handling null values. If you try to sum up anything with a null you'll get null. @SirSQL, that's not true.. You will receive NULL only in EXPRESSIONS.
However Returns correctly 8.
Jun 29 '12 at 08:02 PM
Pavel Pawlowski
I stand corrected
Jun 29 '12 at 08:08 PM
SirSQL
so any insight on what may be causing my issue?
Jun 29 '12 at 08:41 PM
muk
I am with Pavel on this... NULL values are ignored while summing up. You also receive the NULL elimination warning. From BOL
Jul 02 '12 at 07:08 AM
Sacred Jewel
I see what you are saying; however, this is not my issue. The sums actually give me the correct values. I am getting the incorrect values for smallest amount and last amount
Jul 02 '12 at 03:24 PM
muk
(comments are locked)
|


woah I actually just realized that even before adding this field, some people have nulls for smallest amount when they have a largest amount and last gift, something is wrong with this query, help!