grant select on sys.dba_scheduler_job_run_details to user;
create or replace function view_failed_jobs(start_date in timestamp,
rc out sys_refcursor) return integer is
begin
open rc for
select t.OWNER,
t.job_name,
t.ACTUAL_START_DATE,
t.ADDITIONAL_INFO
from dba_scheduler_job_run_details t
where t.STATUS like 'FAILED'
and t.ACTUAL_START_DATE > start_date;
return(1);
end view_failed_jobs;
当我尝试执行此函数时,它返回空光标。但是当我选择它时,它会返回数据。如何解决这个问题?