Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> PL/SQL Problem
Hey Guys,
i got a bit of a problem. here is the code and the associated message.
This is more than likely something small but I just can't figure it out.
Code:
create or replace procedure check_jobs_running as
v_date_dd number(2); v_date_hh number(2); v_thisdate_dd number(2); v_thisdate_hh number(2); v_what varchar2(100); v_magic_number number := 06;
begin
for job_rec in long_jobs
loop
select to_number(to_char(sysdate, 'DD' )) into v_date_dd from dual; select to_number(to_char(sysdate, 'HH24' )) into v_date_hh from dual; select to_number(to_char(job_rec.this_date, 'DD' )) into v_thisdate_ddfrom system.dba_jobs_running;
then
select what into v_what from system.dba_jobs where job = job_rec.job;
elsif ((v_date_hh - v_thisdate_hh) > v_magic_number)
then
select what into v_what from system.dba_jobs where job = job_rec.job;
end if;
end loop;
end;
/
Error:
Errors for PROCEDURE CHECK_JOBS_RUNNING:
LINE/COL ERROR
9/8 PLS-00341: declaration of cursor 'LONG_JOBS' is incomplete or malformed 10/2 PL/SQL: SQL Statement ignored
11/9 PL/SQL: Item ignored 18/3 PL/SQL: SQL Statement ignored 18/79 PLS-00201: identifier 'SYSTEM.DBA_JOBS_RUNNING' must be declared 19/3 PL/SQL: SQL Statement ignored
22/4 PL/SQL: SQL Statement ignored 22/33 PLS-00201: identifier 'SYSTEM.DBA_JOBS' must be declared 25/4 PL/SQL: SQL Statement ignored 25/33 PLS-00201: identifier 'SYSTEM.DBA_JOBS' must be declared
Any help will be greate.
Tony Walby
oracle DBA
Bridgewater Systems
Kanata ON
Canada
Received on Fri Aug 24 2001 - 13:55:15 CDT