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: Oracle For Fun

Re: Oracle For Fun

From: Tony <andrewst_at_onetel.net.uk>
Date: 3 Feb 2004 13:10:52 -0800
Message-ID: <c0e3f26e.0402031310.483f332f@posting.google.com>


"VC" <boston103_at_hotmail.com> wrote in message news:<nGOTb.213791$xy6.1102746_at_attbi_s02>...
> Hello Jeff,
>
> "Jeff" <jeff_at_work.com> wrote in message
> news:bvo85m$mu8$1_at_cronkite.cc.uga.edu...
> > In article <YBCTb.205971$I06.2284013_at_attbi_s01>, "VC"
> <boston103_at_hotmail.com> wrote:
> >
> > >
> > >
> > >Care to elaborate on "doesn' handle null values ? Just being curious...
> >
> > I mean that it does nothing to handle NULL values passed to it. I mean
> that
> > it does not return TRUE or FALSE when a NULL value is passed--it returns
> NULL.
> > Why does this matter? Because NOT NULL <> FALSE. I guess a design
> decision
> > might be involved where you'd want it to return NULL for NULL values
> passed,
> > but that wasn't specified... and looking at your test program, it wasn't
> for
> > you either.
> >
> >
> > > 5 if f1(l.x) then l_str := 'valid'; else l_str := 'not valid'; end
> if;
> >
> > Changing this line to:
> >
> > if NOT f1(l.x) then l_str := 'not valid'; else l_str := 'valid'; end if;
>
> Is not the trick you've just played called 'creating a strawman' in
> logic 101 ? My if-statement handles NULLs just fine, thank you.

Your brief wasn't to write the IF statement, it was to write the function. Your IF statement is merely a test harness for the function.

NOT that I'm saying there is anything wrong with your function; but your IF statement assumes that anything that is not TRUE is FALSE. That isn't true in SQL in general, nor in your function in particular. Received on Tue Feb 03 2004 - 15:10:52 CST

Original text of this message

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