Re: NULL values or Zero in numeric fields?

From: Steve Cosner <stevec_at_zimmer.CSUFresno.EDU>
Date: 1995/12/01
Message-ID: <DIxDu2.DrJ_at_CSUFresno.EDU>#1/1


In article <49ncqo$9oh_at_news.dot.gov> rfrazier_at_mailstorm.dot.gov (Richard Frazier) writes:

>Keep in mind however, that when summing values across fields, you can
>get some unexpected results when numeric fields are null. My own
>experience is that when one field is null, none of the fields get
>computed. So use caution, maybe the 0 is the best answer....depends
>on the circumstances of course.

But it is not difficult, if you are aware that a column may be null, to use SUMX := SUMX+NVL(COLy,0);
That is why the NVL function exists.

Steve Cosner Received on Fri Dec 01 1995 - 00:00:00 CET

Original text of this message