What Richard said :) CALCULATE SUM(field)
or SELECT SUM(field) FROM table... both process nulls consistently as "skip the null values" as do AVERAGE, AVG and the other statistical functions. On Wed, Sep 30, 2015 at 11:34 AM, Richard Kaye <[email protected]> wrote: > That's not quite what Uncle Ted said, Vince. :-) > > SUM is not x+y. Simple math or comparison with a NULL will return NULL. But > aggregate functions have the smarts to not include NULLs. > > -- > > rk > -----Original Message----- > From: ProfoxTech [mailto:[email protected]] On Behalf Of Vince > Teachout > Sent: Wednesday, September 30, 2015 11:31 AM > To: [email protected] > Subject: Re: Isn't CHR(0) null? > > On 9/30/2015 10:31 AM, Ted Roche wrote: >> Sum of NULLs and non-NULLs? The sum of all the non-null values > > Wait, am I misunderstanding you? That sounds like your saying .null. + > something = something. > > One of the biggest bite-my-butts I constantly deal with is coming up with a > null value instead of a number, because somewhere in one of the records I'm > adding, there is a null and I forgot to NVL() it. > > I just did this: > MS SQL Query: print null + 5 -> (no output) > VFP: ? .NULL. + 5 -> .NULL. > > What am I misunderstanding? > > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/cacw6n4uaektrskegrmhmfen+pbu_ojurpyaarovzivhoyml...@mail.gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

