Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: DECODE question
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