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: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Mon, 08 Jul 2002 19:20:17 GMT
Message-ID: <3D29E5C5.BFA66D67@exesolutions.com>


Cynic wrote:

> 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")

You want to use CASE rather than DECODE for this.

Go to http://tahiti.oracle.com

Choose your database version and enter as the search criterion "CASE Expressions".

I 8i you can use CASE in SQL*Plus but it must be wrapped in native dynamic SQL to execute in a stored procedure. This is not necessary in 9i.

Daniel Morgan Received on Mon Jul 08 2002 - 14:20:17 CDT

Original text of this message

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