Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Watch out for this one :o)
Niall Litchfield wrote:
> Here's the problem I have with this behaviour. You will note that I put bug
> in * characters as I know that this is the behaviour I just can't justify
> it. The result from Pl/SQL is correct given the behaviour of SQL.
>
> How do we sum? answer start at zero and add the value of each of the items
> in the series to a running total till we get to the end. If we have no
> values in the series the answer would be on this understanding zero NOT not
> known.
>
> Take the following scenario:
> You go down to the shops. You buy nothing at all? how much have you spent?
> Answer according to this behaviour of Oracle. "I don't know". Answer
> according to me. "Nothing."
>
> --
> Niall Litchfield
> Oracle DBA
> Audit Commission UK
> *****************************************
> Please include version and platform
> and SQL where applicable
> It makes life easier and increases the
> likelihood of a good answer
> ******************************************
> "Vladimir M. Zakharychev" <bob_at_dpsp-yes.com> wrote in message
> news:ahhfu5$qdc$1_at_babylon.agtel.net...
> > > So it seems to me that the *bug* is not in PL/SQL but SQL, given that
> surely
> > > the answer is zero.
> >
> > Surely the answer is NULL (interpreted as "I don't know as there was no
> > data to sum"). :)
> >
> > --
> > Vladimir Zakharychev (bob_at_dpsp-yes.com)
> http://www.dpsp-yes.com
> > Dynamic PSP(tm) - the first true RAD toolkit for Oracle-based internet
> applications.
> > All opinions are mine and do not necessarily go in line with those of my
> employer.
> >
> >
But is the sum of no information an integer?
Daniel Morgan Received on Mon Jul 22 2002 - 18:16:50 CDT