Issue with store procedure...getting compilation error warning
997822Mar 19 2013 — edited Mar 20 2013I tried to get the following stored procedure to work... I've tried two different versions of the procedure... I have both versions below. I get a warning that the procedure was created but with compilation errors... this happens in Oracle 11g Express Edition... it references a function that I already created and has been tested.
Version 1:
create or replace procedure ins_ints(v1 number)
as begin
for i in 1..v1 loop
insert into integers values(i,odd_even(i));
end loop;
end ins_ints;
/
Version 2:
create or replace procedure ins_ints(v1 in number)
as begin
for i in 1..v1 loop
insert into integers values(i,odd_even(i));
end loop;
end ins_ints;
/
Any idea whats wrong?
Note: The odd_even function has the following function call:
odd_even(v1 number) return varchar2
again, just calling the funciton from the command line (SQL *Plus) works.
Thanks!