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: PL/SQL - DECODE

Re: PL/SQL - DECODE

From: Kenneth C Stahl <BluesSax_at_Unforgettable.com>
Date: Mon, 02 Aug 1999 14:57:26 -0400
Message-ID: <37A5EA16.6510E8EB@Unforgettable.com>


Use an if..then..else construct. decode() is an oracle-specific non-ansi extension to sql. The fact that pl/sql has some functions which work exactly the same as sql functions is, to some extent, coincidental. Oracle decided not to implement decode() in pl/sql and as a result it is not available.

Nandakumar wrote:

> Hi
>
> What is the equivalent of decode (of SQL) in PL/SQL?
> Any SWITCH/WHEN/CASE are available in PL?SQL???
>
> It appears like DECODE not allowes in PL/SQL!!
> PLS-00204: function or pseudo-column 'DECODE' may be used inside
> a SQL statement only
> --
> Nandakumar
> Systems Analyst
> New York
> (N.Kumar_at_rocketmail.com)
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
Received on Mon Aug 02 1999 - 13:57:26 CDT

Original text of this message

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