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 question

Re: DECODE question

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Mon, 8 Jul 2002 21:11:31 +0200
Message-ID: <uijpaj3aper9e@corp.supernews.com>

"Cynic" <ksd9_at_yahoo.com> wrote in message news:uijjmmnp2c4810_at_corp.supernews.com...
> Does anyone know of a good location where I can find documentation on
> DECODE?
>
> I'm attempting to translate Access queries into Oracle views and need to
> find a replacement for Access' "IIf" statement. I'm hoping DECODE will be
> it, but I'm trying to find out how to replace the following:
> Select IIF(ord_amt > 1000, "Large", "Small")
>
>
>

decode(sign(ord_amt - 1000),1,'Large','Small') You can find information on decode in the sql reference manual, but I doubt it will have this example, which requires some combining of functions.

Hth

--
Sybrand Bakker
Senior Oracle DBA

to reply remove '-verwijderdit' from my e-mail address
Received on Mon Jul 08 2002 - 14:11:31 CDT

Original text of this message

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