Home > Database > Mysql Tutorial > Oracle的定时器使用示例

Oracle的定时器使用示例

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 14:57:58
Original
1275 people have browsed it

Oracle的job每分钟执行一次存储过程。 无 --Oracle定时job--数据库执行此脚本时时,请确保只执行一次,否则会引发错误!declare job_id number; begin dbms_job.submit(job_id,'Reinsure_Writeback_Opdate;',sysdate,'sysdate+1/(24*60)'); commit; END;/--存

Oracle的job每分钟执行一次存储过程。
--Oracle定时job
--数据库执行此脚本时时,请确保只执行一次,否则会引发错误!
declare job_id number;  
begin  
dbms_job.submit(job_id,'Reinsure_Writeback_Opdate;',sysdate,'sysdate+1/(24*60)');  
commit;  
END;
/

--存储过程
create or replace procedure Reinsure_Writeback_Opdate as
begin
  update WEB_RI_SETT_MAIN B
     set B.C_RP_FLAG =
         (select case
                   when C.OPDATE is null then
                    '0'
                   else
                    '1'
                 end
            from web_fin_write_back C
           where C.BATCHNO = B.C_SETT_NO)
   where exists
   (select 1 from web_fin_write_back C where C.BATCHNO = B.C_SETT_NO);
   commit;
end Reinsure_Writeback_Opdate;

Copy after login
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template