Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Simple NVL question

Re: Simple NVL question

From: <hanna_shaw_at_my-deja.com>
Date: Fri, 05 Jan 2001 21:24:46 GMT
Message-ID: <935e2k$8bl$1@nnrp1.deja.com>

select field1, sum(nvl(field2,0)) from ...

In article <935d3r$7iq$1_at_nnrp1.deja.com>,   Glen A. Stromquist <glenstr_at_my-deja.com> wrote:
> It must be friday, my brain has locked up already...
>
> I want to do a query on a table that sums a column that may have null
> values. So I type in:
>
> select field1, nvl(sum(field2),0)
> from table
> group by field1
>
> ERROR:
> ORA-24347: Warning of a NULL column in an aggregate function
>
> Interestingly enough, the same query without the NVL function returns
> results when I run it in a TOAD window.
>
> I'm missing something obvious here... what is it?
>
> Sent via Deja.com
> http://www.deja.com/
>

Sent via Deja.com
http://www.deja.com/ Received on Fri Jan 05 2001 - 15:24:46 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US