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?


_______________________________________________
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/sn1pr10mb092853b69ba0211b745d5f1dd2...@sn1pr10mb0928.namprd10.prod.outlook.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.

Reply via email to