RE: Consistent Null Handling

  • From: "Lex de Haan" <lex.de.haan@xxxxxxxxxxxxxx>
  • To: <thomas.mercadante@xxxxxxxxxxxxxxxxx>, <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 3 Sep 2004 15:08:31 +0200

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


-- Binary/unsupported file stripped by Ecartis --
-- Type: text/x-vcard
-- File: Lex de Haan.vcf


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

Other related posts: