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