create or replace  procedure test_prox as
n number;  --这里要加分号
begin
n:=0;
dbms_job.submit(n,'test;',sysdate);  --这里把:n改成n
commit;
end;oracle 817编译通过;

解决方案 »

  1.   

    Create Or Replace Procedure Auto_Cljs_Job (v_timestr In Varchar2,v_jobno Out Varchar2,v_msg Out Varchar2) Is/******************************************************************************
       PURPOSE:  自动潮流计算Job的建立与更改     REVISIONS:
       Ver        Date        Author           Description
       ---------  ----------  ---------------  ------------------------------------
       1.0        2003-10-17   Fred Zhang       1. Created this procedure.
    ******************************************************************************/
    jobno Integer;
    jobid Integer;
    Begin
      Select job Into jobid From all_jobs Where what='AUTO_CLJS;';          
        dbms_job.Change(jobid,'AUTO_CLJS;',To_Date(To_Char(Sysdate,'yyyy-mm-dd')||' '||V_timestr,'yyyy-mm-dd hh24:mi:ss'),'trunc(sysdate,''mi'')+1');
        Commit;
        v_jobno:=jobid;
        v_msg:='恭喜你!自动计算设定已经成功更改!'; 
        Exception When No_Data_Found Then
          dbms_job.submit(jobid,'AUTO_CLJS;',To_Date(To_Char(Sysdate,'yyyy-mm-dd')||' '||V_timestr,'yyyy-mm-dd hh24:mi:ss'),'trunc(sysdate,''mi'')+1');
          Commit;
          v_jobno:=jobid;
          v_msg:='恭喜你!自动计算已经成功设定!';          End  Auto_Cljs_Job;
      

  2.   

    cnn.commandtext = 
    "{call dbms_job.submit(0,"test",to_date('2004-06-16','YYYY-MM-DD'))}"