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

Home -> Community -> Usenet -> c.d.o.misc -> Re: DECODE is fine, but where is the IIF ?

Re: DECODE is fine, but where is the IIF ?

From: Sriram <sriramp_at_igate.abbott.com>
Date: 1997/11/04
Message-ID: <01bce959$83005710$5b1e14ac@ncoraweb1>#1/1

try this :
  decode (sign(x-y),-1,'less',1,'greater)   The sign function returns only three values : -1 for negatives, 1 for positives and 0 for 0's.

  Hope this helps.

terryg8 <trg_at_ibm.net> wrote in article <345E189A.261E_at_ibm.net>...
> Michael G. Schneider wrote:
> >
> > Beginner's question:
> >
> > I just learned about the DECODE function. Very good, but what I am
 missing
> > is a way to not compare against certain values, but instead being able
 to
> > code a boolean condition (something like an IIF an Visual Basic). For
> > example the following:
> >
> > DECODE(x<y, TRUE, 'less', FALSE, 'greater')
> >
> > isn't possible. Or is it somehow?
> >
> > Michael G. Schneider
Received on Tue Nov 04 1997 - 00:00:00 CST

Original text of this message

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