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 problem

Re: PL/SQL problem

From: Paul Brewer <paul_at_paul.brewers.org.uk>
Date: Thu, 6 Feb 2003 19:54:27 -0000
Message-ID: <3e42bfd9_3@mk-nntp-1.news.uk.worldonline.com>


"Billy Verreynne" <vslabs_at_onwe.co.za> wrote in message news:b1t2j6$7rk$1_at_ctb-nnrp2.saix.net...
> Jan Gelbrich wrote:
>
> > DECODE can only be used in a SQL statement, but not within PL/SQL.
> > Source: Oracle SQL Reference by Kreines & Jacobs, O´Reilly.
>
> Bull.
>
> SQL> create or replace procedure xtest as
> 2 x varchar2(20);
> 3 begin
> 4 select decode('xxx', '1', '1', '2' ) into x from dual;
> 5* end;
> SQL> /
>
> Procedure created.
>
> SQL> show errors
> No errors.
> SQL>
>

Billy,

It can be used in SQL statements contained in PL/SQL blocks, but not I think within PL/SQL code.

Regards,
Paul Received on Thu Feb 06 2003 - 13:54:27 CST

Original text of this message

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