declare cursor timed_trans_cur is select job from user_jobs where what = 'workflow_case.sweep_timed_transitions;'; cursor hold_timeout_cur is select job from user_jobs where what = 'workflow_case.sweep_hold_timeout;'; job_no number; begin open timed_trans_cur; fetch timed_trans_cur into job_no; if not timed_trans_cur%NOTFOUND then dbms_job.remove( job => job_no ); end if; open hold_timeout_cur; fetch hold_timeout_cur into job_no; if not timed_trans_cur%NOTFOUND then dbms_job.remove( job => job_no ); end if; end; / show errors;