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: Watch out for this one :o)

Re: Watch out for this one :o)

From: Howard J. Rogers <howardjr2000_at_yahoo.com.au>
Date: Thu, 25 Jul 2002 06:18:03 +1000
Message-ID: <ahn20b$777$1@lust.ihug.co.nz>


You been visiting Bombay again, Niall?
;-)
HJR "Niall Litchfield" <niall.litchfield_at_dial.pipex.com> wrote in message news:3d3ef25e$0$8509$cc9e4d1f_at_news.dial.pipex.com...
> insert into billing_info(amount_paid,reason_code)
> values('ah can da ye a pony a week tuesday ''sright?','blagger')
>
>
> --
> 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
> ******************************************
>
> --
> 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
> ******************************************
> "Daniel Morgan" <dmorgan_at_exesolutions.com> wrote in message
> news:3D3EC585.E12AEF93_at_exesolutions.com...
> > SELECT NVL(TO_CHAR(SUM(amount_paid)), 'That''ll be a fiver, love')
> > FROM billing_info
> > WHERE 1=2;
> >
> > Daniel Morgan
> >
> >
> >
> > "Howard J. Rogers" wrote:
> >
> > > "Connor McDonald" <connor_mcdonald_at_yahoo.com> wrote in message
> > > news:3D3DC463.29A6_at_yahoo.com...
> > > > 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.
> > > > > >
> > > > > >
> > > >
> > > > (Strictly from a philosophical perspective) I actually agree with
the
> > > > SQL definition...
> > > >
> > > > If someone tells me "I'm about to give you a list of numbers to add
> up",
> > > > I don't scribble down '0' on a piece of paper in order to add the
> > > > subsequent numbers, I don't write down anything until the first
number
> > > > comes along...
> > > >
> > > > Similarly, if (before any numbers are presented), someone says "What
> is
> > > > the total so far", I'd probably reply with "Nothing! You ain't given
> me
> > > > none" (as opposed to) "zero".
> > > >
> > >
> > > At which point I'd clip you round the ear for propogating double
> negatives.
> > >
> > > And for using the word "ain't" when you meant to use the contraction
> > > "haven't".
> > >
> > > Natural language queries: God bless 'em!
> > >
> > > "'ere! 'Ow much fura pind o' sprahts?"
> > >
> > > I'm looking forward to the day when SQL*Plus returns the results:
> "That'll
> > > be a fiver, love"
> > >
> > > Regards
> > > HJR
> > >
> > > > :-)
> > > >
> > > > Cheers
> > > > Connor
> > > > --
> > > > ==============================
> > > > Connor McDonald
> > > >
> > > > http://www.oracledba.co.uk
> > > >
> > > > "Some days you're the pigeon, some days you're the statue..."
> >
>
>
Received on Wed Jul 24 2002 - 15:18:03 CDT

Original text of this message

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