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!

Issue with store procedure...getting compilation error warning

997822Mar 19 2013 — edited Mar 20 2013
I 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!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 17 2013
Added on Mar 19 2013
3 comments
290 views