Question : dbms_jobs

I have a procedure as follows

procedure jobtest is
x varchar2(10);
begin
x := 1;
end;

When I execute this script
DECLARE
xjob number;
begin
  dbms_job.submit( xjob, 'JOBTEST',  sysdate, 'sysdate + 1' );
end;
/

it gives me the following error message

ERROR at line 1:
ORA-06550: line 1, column 101:
PLS-00103: Encountered the symbol "END" when expecting one of the following:
:= . ( @ % ;
The symbol ";" was substituted for "END" to continue.
ORA-06512: at "SYS.DBMS_JOB", line 72
ORA-06512: at "SYS.DBMS_JOB", line 122
ORA-06512: at line 4

As you can see there is no syntax error in the scripts,
I am not able to figure out what could be problem

Can anyone help please

Thanks!

Answer : dbms_jobs

Change your statement from
dbms_job.submit( xjob, 'JOBTEST',  sysdate, 'sysdate + 1' );

TO:
dbms_job.submit( xjob, 'JOBTEST;',  sysdate, 'sysdate + 1' );

The ';' is required.
Random Solutions  
 
programming4us programming4us