Home » SQL & PL/SQL » SQL & PL/SQL » Creating Job Thruough DBMS_SCHEDULER
Creating Job Thruough DBMS_SCHEDULER [message #311028] Thu, 03 April 2008 04:50 Go to next message
ramya29p
Messages: 100
Registered: November 2007
Location: Chennai
Senior Member
Hi,
i am Trying to Create the Job through DBMS_SCHEDULER.
BEGIN
DBMS_SCHEDULER.CREATE_JOB(
   job_name          =>  'job1',
   job_type          =>  'PLSQL_BLOCK',
   job_action        =>  'Insert into persons values (12334,''Henry'');'
   start_date        =>   SYSDATE,
   repeat_interval   =>  'FREQ = DAILY; INTERVAL = 1');
END;


but i am getting the Following Error.can any one tell me what is wrong in this code?

ORA-06550: line 6, column 4:
PLS-00103: Encountered the symbol "START_DATE" when expecting one of the following:

   ) , * & = - + < / > at in is mod remainder not rem
   <an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
   LIKE4_ LIKEC_ between || multiset member SUBMULTISET_
The symbol "," was substituted for "START_DATE" to continue.
Re: Creating Job Thruough DBMS_SCHEDULER [message #311035 is a reply to message #311028] Thu, 03 April 2008 05:06 Go to previous messageGo to next message
dhananjay
Messages: 635
Registered: March 2002
Location: Mumbai
Senior Member
Quote:
job_action => 'Insert into persons values (12334,''Henry'');'

your are missing the begin ...end;

regards,
Re: Creating Job Thruough DBMS_SCHEDULER [message #311037 is a reply to message #311028] Thu, 03 April 2008 05:08 Go to previous messageGo to next message
pablolee
Messages: 2836
Registered: May 2007
Location: Scotland
Senior Member
'Insert into persons values (12334,''Henry'');'
Missing a comma at the end.
Re: Creating Job Thruough DBMS_SCHEDULER [message #311039 is a reply to message #311037] Thu, 03 April 2008 05:11 Go to previous messageGo to next message
ramya29p
Messages: 100
Registered: November 2007
Location: Chennai
Senior Member
Ok,Thank you very much
Re: Creating Job Thruough DBMS_SCHEDULER [message #311041 is a reply to message #311039] Thu, 03 April 2008 05:16 Go to previous message
pablolee
Messages: 2836
Registered: May 2007
Location: Scotland
Senior Member
ramya29p wrote on Thu, 03 April 2008 11:11
Ok,Thank you very much

You are welcome, and thank YOU for posting a clear, concise, well formatted and easy to understand question in the correct forum (a rare thing indeed Smile )
Previous Topic: Need help with passing parameter to procedure
Next Topic: commit the records
Goto Forum:
  


Current Time: Sun Dec 11 06:36:50 CST 2016

Total time taken to generate the page: 0.09264 seconds