new to sqlplus

From: peter wang <g.wang_at_sympatico.ca>
Date: Tue, 5 Nov 2002 22:42:35 -0500
Message-ID: <Cc0y9.4051$EY2.843667_at_news20.bellglobal.com>



[Quoted] Hi all,

[Quoted] 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 - 04:42:35 CET

Original text of this message