How do I sum only negative field values in MS SQL reports
Posted on 2005-03-25
This might be an easy answer for you guys, but its a tough question for me!
I've built a simple SQL report which needs to total wirless accounts which have negative message balances on their unit's.
and then sum only the negative values in order to produce a total of the negative numbers ignoring the positive numbers.
EXAMPLE of what I need:
Record 1 Value 2
Record 2 Value -2
Record 3 Value -2
SUM of ALL records = -4 which ignores the positive numbers
My current formula doesn't work because it 'sums' everything instead of just negative numbers.
Thank you very much for your help.