Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

pls -00371 error (problem in multiple declaration )

739276Dec 18 2009 — edited Dec 18 2009
function code:
//start
create or replace function salinc(si number default 10) return number
is
number sinc;
number bef;
number aft;
begin
select sum(sal) into bef from emp where deptno=si;
update employees set sal=sal+200 where deptno=si;
select sum(sal) into aft from emp where deptno=si;
sinc:=aft-bef;
return sinc;
end salinc;
//end

is giving me these 2 errors:
0/0 PL/SQL: Compilation unit analysis terminated
1/46 PLS-00371: at most one declaration for 'NUMBER' is permitted in t he declaration section


how can i now declare the variables ?? need help
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 15 2010
Added on Dec 18 2009
2 comments
3,292 views