10g - database version
Am moving dbms_job to dbms_scheduler and part of my program uses a cursor to see if that job already exists (then doesnt create it, if it is there)
CURSOR c1 (cv_job_name dbms_scheduler_jobs.job_name%TYPE)
select 1
from dbms_scheduler_jobs
where schedule_type = 'ONCE'
and state = 'SCHEDULED'
and job_name = cv_job_name;
When I go to compile this package i get a error - PL/SQL: SQL Statement ignored
PL/SQL: ORA-00942: table or view does not exist
I am logged into the same schema as the package is on, on SQL Developer and can execute the select statement from there.
The schema also has select privs to the dbms_scheduler_jobs view aswell.
Any ideas why I can't do this select in a cursor ?