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-00357: Table,View Or Sequence reference 'POC_AD0FFFKMZ6QQ0' not allowed

YoavJun 30 2011 — edited Jun 30 2011
Hi,

The following procedure execute a scheculer.
create or replace procedure GENERATE_LOAD_TYPE (p_module_type in varchar2)
as
cursor c is
select id,view_name
from   poc_test
where  view_name='POC_AD0FFFKMZ6QQ0';


Begin

for c_rec in c loop
    BEGIN
      DBMS_SCHEDULER.create_job (
        job_name        => c_rec.view_name||'_job',
        job_type        => 'PLSQL_BLOCK',
        job_action      => 'BEGIN POC_LOADER('||c_rec.id||','||c_rec.view_name||'); commit; END;',
        start_date      => SYSTIMESTAMP,
        repeat_interval => 'SYSTIMESTAMP + 365 /* 1 Year */',
        enabled         => TRUE);
    exit;
   END;
   
end loop;

end;

exec GENERATE_LOAD_TYPE('1');

PL/SQL procedure successfully completed.
But the Job is failed on the follwoing error message:
select additional_info from DBA_SCHEDULER_JOB_LOG where job_name='POC_AD0FFFKMZ6QQ0_JOB'


ORA-06550: line ORA-06550: line 1, column 505:
PLS-00357: Table,View Or Sequence reference 'POC_AD0FFFKMZ6QQ0' not allowed in this context
ORA-06550: line 1, column 476:
PL/SQL: Statement ignored , column :
The problem is related to this line :
  job_action      => 'BEGIN POC_LOADER('||c_rec.id||','||c_rec.view_name||'); commit; END;',
When i remove the parameters (e.g: c_rec.id||','||c_rec.view_name) its worked fine.
Please advice .

Thanks
This post has been answered by 189821 on Jun 30 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 28 2011
Added on Jun 30 2011
1 comment
2,655 views