标签:exception where hat creat com 技术 存储过程 roc span
create or replace procedure P_DMI_AGENT is
begin
delete DMI_AGENT;
insert into DMI_AGENT SELECT * FROM DMI_AGENT_v_sysdate;
insert into DMI_AGENT SELECT * FROM DMI_AGENT_v_sysdate1;
insert into DMI_AGENT SELECT * FROM DMI_AGENT_v_sysdate2;
insert into DMI_AGENT_LOG(dateid,taskno,successcnt)values(to_number(to_char(sysdate, ‘yyyymmdd‘)),‘团体人力推送接口‘,‘1‘);
exception when others then
insert into DMI_AGENT_LOG(dateid,taskno,successcnt)values(to_number(to_char(sysdate, ‘yyyymmdd‘)),‘团体人力推送接口‘,‘0‘);
end;
declare
job integer;
begin
dbms_job.submit(job,‘P_DMI_AGENT;‘,trunc(sysdate),‘trunc(sysdate)+1‘);
commit;
end;
SELECT j.JOB,j.LAST_DATE,j.LAST_SEC,j.NEXT_DATE,j.NEXT_SEC,j.interval,j.WHAT FROM dba_jobs j where j.WHAT = ‘P_DMI_AGENT;‘;
标签:exception where hat creat com 技术 存储过程 roc span
原文地址:https://www.cnblogs.com/paul-blog/p/9121545.html