When I try and package this stored procedure I get an error.
Error report:
ORA-06550: line 2, column 1:
PLS-00905: object moveproduct is invalid
ORA-06550: line 2, column 1:
PL/SQL: Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
create or replace
procedure moveproduct is
cursor cPrograms is
select * from program;
cursor cProducts(vprogramid number) is
select * from nis_sample.price_list where program_id = vprogramid;
begin
for a in cPrograms loop
for b in cProducts(a.programid) loop
insert into product(
productid, isactive, producttype, productname, productdescription, fee, feetype,
isproficiencytestrequired, special, remarks, testmethod, testmethodcount, designation, programid
)
values(
product_seq.nextval,
decode(b.active, 'Y', 1, 0),
b.fee_type,
b.title,
b.description,
b.fee,
b.fixed_or_variable,
decode(b.proficiency_test_reqd, 'Y', 1, 0),
b.special,
b.remarks,
b.test_method,
b.test_method_count,
b.desig,
a.programid
);
end loop;
Error report:
ORA-06550: line 2, column 1:
PLS-00905: object moveproduct is invalid
ORA-06550: line 2, column 1:
PL/SQL: Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
create or replace
procedure moveproduct is
cursor cPrograms is
select * from program;
cursor cProducts(vprogramid number) is
select * from nis_sample.price_list where program_id = vprogramid;
begin
for a in cPrograms loop
for b in cProducts(a.programid) loop
insert into product(
productid, isactive, producttype, productname, productdescription, fee, feetype,
isproficiencytestrequired, special, remarks, testmethod, testmethodcount, designation, programid
)
values(
product_seq.nextval,
decode(b.active, 'Y', 1, 0),
b.fee_type,
b.title,
b.description,
b.fee,
b.fixed_or_variable,
decode(b.proficiency_test_reqd, 'Y', 1, 0),
b.special,
b.remarks,
b.test_method,
b.test_method_count,
b.desig,
a.programid
);
end loop;