【定时器】关于oracle定时器
代码如下:
---定时器
declare jobno number;
begin dbms_job.submit(
jobno,what =>'Sp_cast_MacInfo_Mes',
interval =>'TRUNC(sysdate,"mi")+1/(24*60)'
);
commit;
end;
错误如下:
ora-23319:参数值"'TRUNC(sysdate,"mi")+1/(24*60)'不正确
"
求大神解决
[解决办法]
2错误,
1)Sp_cast_MacInfo_Mes后面要加分号
2)'TRUNC(sysdate,"mi")+1/(24*60)'这里mi前后是2个单引号,不是双引号。因为在单引号里面用单引号,必须用2个表示转义。
declarejobno number;begindbms_job.submit( jobno,what =>'Sp_cast_MacInfo_Mes;', interval =>'TRUNC(sysdate,''mi'')+1/(24*60)');commit;end;