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: Compilation error

Re: Compilation error

From: g.r.s. deisz <g.r.s.deisz_at_ptt-telecom.unisource.nl>
Date: 1997/03/12
Message-ID: <5g6bqf$8vo@pwxl01.telecom.ptt.nl>#1/1

In article <01bc2ecd$17fa8a40$621e0a0a_at_pc3098.ntucworld.org.sg>,

   "Jean" <neoch_at_ntucworld.org.sg> wrote:
>I have written the following procedure:
>
>create procedure andy as
>begin
> select 'aaa' from dual;
>end;
>/
>
>It compiles with error. I don't understand. Can anyone please enlighten
>me!!!!

The code specifies a select, but does not specify what to do with the result. It should be something like:

create procedure andy as
begin

	select 'aaa'
        into   <some variable>
        from dual;

end;
/

If you had typed "show error", Oracle would have told you:

SQL> show error
Errors for PROCEDURE ANDY:

LINE/COL ERROR

-------- -----------------------------------------------------------------
3/2      PLS-00428: an INTO clause is expected in this SELECT statement
3/2      PL/SQL: SQL Statement ignored
SQL>         

Regards,

Stefan.


Name      :G.R.S. Deisz
Phone     :+31-50-5855954
E mail    :G.R.S.Deisz_at_PTT-Telecom.Unisource.NL
DISCLAIMER:This statement is not an official statement from, nor
           does it represent an official position of, PTT Telecom BV.
Received on Wed Mar 12 1997 - 00:00:00 CST

Original text of this message

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