Re: create procedure problems
Date: 1995/11/15
Message-ID: <48cqpp$8rj_at_inet-nntp-gw-1.us.oracle.com>#1/1
homayoun sadri <homayoun.sadri.0245197_at_nt.com> wrote:
>hello to all,
>here is the situation; i have all necessary privs, space,and have run
>catproc.sql and dbmsstdx.sql and everything is peaches(no errors).
>now when i go to create a procedure like:
>SQLDBA> create or replace procedure asdf as
> 2> begin
> 3> select table_name from user_tables;
> 4> end asdf;
> 5> /
>i get the following message:
You need to select into something or loop over the results. If what you were trying to do was print out the results you would:
create of replace procedure asdf
as
begin
for x in ( select table_name from user_tables ) loop
dbms_output.put_line( x.table_name );
end loop;
end;
/
Make sure you issue "set serveroutput on" in your sql*plus session or more simply put "set serveroutput on" in your login.sql file.
>DBA-00072: Warning: PROCEDURE ASDF created with compilation errors.
>SQLDBA>
>and when i look in the dba_errors, i see:
>SQLDBA> select * from dba_errors;
>OWNER NAME TYPE
>SEQUE
>------------------------------ ------------------------------
>------------ -----
>NCE LINE POSITION TEXT
>----- ---------- ----------
>----------------------------------------------------
>----------------------------
>HSADRI ASDF PROCEDURE
> 1 3 19 PLS-00103: Encountered the symbol "FROM" when
>expect
>ing one of the following:
> .
>1 row selected.
>SQLDBA>
>can anyone be kind enough to suggest what is going on here.
>thanks in advance
>homayoun sadri
>homayoun.sadri.0245197_at_nt.com
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Received on Wed Nov 15 1995 - 00:00:00 CET