Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL problem
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>
-- BillyReceived on Thu Feb 06 2003 - 03:23:54 CST