学习是一种信仰。
分类: Oracle
2013-04-29 17:43:03
DECLARE
X NUMBER;
BEGIN
SYS.DBMS_JOB.SUBMIT
( job => X
,what => 'PROC_REPORT_DAILY;'
,next_date => to_date('29/04/2013 11:29:31','dd/mm/yyyy hh24:mi:ss')
,interval => 'sysdate+1'
,no_parse => FALSE
);
SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(x));
COMMIT;
END;
/
月报:
BEGIN
SYS.DBMS_JOB.REMOVE(45);
COMMIT;
END;
/
DECLARE
X NUMBER;
BEGIN
SYS.DBMS_JOB.SUBMIT
( job => X
,what => 'PROC_REPORT_MONTHLY;'
,next_date => to_date('01/05/2013 07:00:00','dd/mm/yyyy hh24:mi:ss')
,interval => 'add_months(trunc(sysdate,''mm''),1)+7/24'
,no_parse => FALSE
);
SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(x));
COMMIT;
END;