RE: Consistent Null Handling

  • From: "Mercadante, Thomas F" <thomas.mercadante@xxxxxxxxxxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Fri, 3 Sep 2004 09:29:15 -0400

Lex,

I remember this being a problem back in the Oracle 6 days.  My recollection
is that any function running against a column that contained a null would
prevent the function from returning anything except null.

Can't prove it anymore, but it really doesn't matter.  It works the way it
works now.

Tom Mercadante
Oracle Certified Professional


-----Original Message-----
From: Lex de Haan [mailto:lex.de.haan@xxxxxxxxxxxxxx] 
Sent: Friday, September 03, 2004 9:09 AM
To: thomas.mercadante@xxxxxxxxxxxxxxxxx; oracle-l@xxxxxxxxxxxxx
Subject: RE: Consistent Null Handling


Hi Tom,

I am not sure, but I don't think this has been any different in earlier
releases of Oracle. Note however that the following three Oracle expressions
are (and always have been) *different* that is, they give *different*
results under certain conditions:

- sum(x)
- sum(nvl(x,0))
- nvl(sum(x),0)

Kind regards,
Lex.

-------------------------------
visit http://www.naturaljoin.nl
-------------------------------
skype me <callto://lexdehaan>

-----Original Message-----

Ian,

This is true for 817 & 9204.  I could have sworn that you needed to do the
following to get it to work:

Select sum(nvl(col1,0)) from table

Maybe in a prior release (like 6.x) the above was required.

Tom Mercadante
Oracle Certified Professional
--
To unsubscribe - mailto:oracle-l-request@xxxxxxxxxxxxx&subject=unsubscribe 
To search the archives - //www.freelists.org/archives/oracle-l/

Other related posts: