Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: procedure error

Re: procedure error

From: Jim Smith <jim_at_jimsmith.demon.co.uk>
Date: 1997/02/25
Message-ID: <5X$6xDAyexEzEwD2@jimsmith.demon.co.uk>#1/1

In article <19970225134701.IAA11630_at_ladder02.news.aol.com>, Memphis rs <memphisrs_at_aol.com> writes
>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:
> := . ( @ % ;
>

There are two errors. The first is that procedure parameters should be in parenthesis. The second is that FORD is actually a string literal, but without the quotes it is assumed to be a variable. You should say

execute emp_info('FORD');

-- 
Jim Smith
Received on Tue Feb 25 1997 - 00:00:00 CST

Original text of this message

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