DECLARE job NUMBER;
begin
sys.dbms_job.submit(job =>:job,
what => 'docontractreports;',
next_date => to_date('05-11-2010', 'dd-mm-yyyy'),
interval => 'trunc(sysdate, ''HH24'') + 1/2');
SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(job));
commit;
end;
/
ORA-01008: 并非所有变量都已绑定
经查询,是因为多了个冒号"
:
", 把冒号去掉就ok 了。
改正后
DECLARE job NUMBER;
begin
sys.dbms_job.submit(job =>job, --注意:此处没有冒号了
what => 'docontractreports;',
next_date => to_date('05-11-2010', 'dd-mm-yyyy'),
interval => 'trunc(sysdate, ''HH24'') + 1/2');
SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(job));
commit;
end;
/