Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: procedure error
Memphis rs wrote:
>
> Does anyone know why I am getting a error when executing the following:
>
> create or replace
>
> procedure emp_info (person in varchar2)
>
> is
>
> BEGIN for c1 in
>
> (select ename
>
> from emp
>
> where ename = person)
>
> loop
>
> dbms_output.put_line(c1.ename);
>
> end loop;
>
> end;
>
> /
> ------------------------
> Here is the error
> ------------------------
> SQL> exec emp_info FORD
>
> begin emp_info FORD; end;
>
>
>
> *
>
> ERROR at line 1:
>
> ORA-06550: line 1, column 16:
>
> PLS-00103: Encountered the symbol "FORD" when
> expecting one of the following:
> := . ( @ % ;
>
> The symbol ":=" was substituted for "FORD" to continue.
>
> Any help will be appreciated
> Richard Slochowsky
> Entergy Integrated Solutions, Inc.
> rslochow_at_esasi.com
> Richard Slochowsky
> Entergy Integrated Solutions, Inc.
All you need is to change the execution to this begin emp_info('FORD'); end;
The argument must be in () with literals in ' '.
Otherwise, your procedure is fine.
-- Thomas Griffin Project Leader QUALITECH Systems, Inc. tgriffin_at_qualitech.comReceived on Tue Feb 25 1997 - 00:00:00 CST