How to schedule a job at a certain time? [message #37552] |
Wed, 13 February 2002 23:13 |
Cherilyn Tan
Messages: 2 Registered: November 2001
|
Junior Member |
|
|
Hi,
I would like to execute a job using dbms_job.submit. To avoid an execution drift, I set the interval to be 'trunc(sysdate + 1, "hh24")'. How do avoid getting an error? Below is an extract of my code:
SQL> variable jobno number;
SQL> begin
2 dbms_job.submit(:jobno,'sp_name',to_date("14-feb-2002 17:01","dd-mon-yyyy hh24:mi"),trunc(sysdate + 1,"hh24"));
3 commit;
4 end;
SQL> /
to_date("14-feb-2002 17:01","dd-mon-yyyy hh24:mi"),
*
ERROR at line 3:
ORA-06550: line 3, column 9:
PLS-00201: identifier '14-feb-2002 17:01' must be declared
ORA-06550: line 2, column 1:
PL/SQL: Statement ignored
|
|
|
|
Re: How to schedule a job at a certain time? [message #37577 is a reply to message #37552] |
Thu, 14 February 2002 12:20 |
Suresh Vemulapalli
Messages: 624 Registered: August 2000
|
Senior Member |
|
|
i think u r using double quotes..
SQL> variable jobno number;
SQL> begin
2 dbms_job.submit(:jobno,'sp_name;',to_date('14-feb-2002 17:01','dd-mon-yyyy hh24:mi'),trunc(sysdate + 1,''hh24''));
3 commit;
4 end;
SQL> /
Note: use single quotes only (''=> 2 single quotes)
|
|
|