Re: new to sqlplus

From: Martin Doherty <martin.doherty_at_oracle.nospam.com>
Date: Tue, 05 Nov 2002 20:59:32 -0800
Message-ID: <so1y9.19$E23.190_at_news.oracle.com>


Did you run the code creation script prior to attempting to execute the stored procedure? START RAISE_SALARY or _at_RAISE_SALARY to run the script.

Did you get the message 'Procedure created'? If it didn't compile (by the way, code compilation is implicit in creating a procedure) then type SHOW ERROR to see compiler error messages.

The code seems shipshape except "update EMP st SAL = empsal *((100+percentage)/100)" .... you misspelled the word "set".

Martin

peter wang wrote:

>Hi all,
>
>I wrote a oracle stored procedure, I'd like to run it under sqlplus shell,
>but always get same error message, do I need ti compile it? if so, how to do
>it? anybody like help me?
>
>raise_salary.sql
>
>create procedure raise_salary (dno number, percentage number DEFAULT 0.5) is
>cursor emp_cur(dept_no number) is
>select SAL from EMP where DEPTNO=dept_no
>for update of SAL;
>empsal number(8);
>begin
>open emp_cur(dno)
>loop
>fetch emp_cur into empsal;
>exit when emp_cur%NOTFOUND;
>update EMP st SAL = empsal *((100+percentage)/100)
>where current of emp_cur;
>end loop;
>close emp_cur;
>commit;
>end raise_salary;
>/
>
>SQL>exec raise_salary(7782)
>
>ERROR at line 1:
>ORA-06550: line 1, column 7:
>PLS-00201: identifier 'RAISE_SALARY' must be declared
>ORA-06550: line 1, column 7:
>PL/SQL: Statement ignored
>
>
>
>
Received on Wed Nov 06 2002 - 05:59:32 CET

Original text of this message