create or replace procedure proc_insert( vjh out char,jls out number)
 as
 begin
   select jh into vjh from dde01;
   select count(*) into jls from tszl_tsjcsj;
   if (jls=0) then 
      insert into tszl_tsjcsj(jh) values(vjh);
   end if; 
 end;

解决方案 »

  1.   

    修改后如下,按F8后显示编译成功,我想让过程在0点执行,下一步该如何做呢?
    create or replace procedure proc_insert
    is
      jls integer;
      vjh varchar2(16);
     begin
       select jh into vjh from dde01;
       select count(*) into jls from tszl_tsjcsj;
       if (jls=0) then 
          insert into tszl_tsjcsj(jh) values(vjh);
          commit;
       end if; 
      
     end;
      

  2.   

    out :是输出参数 ,当然没有什么用处了
      

  3.   

    在12:00:00 执行
      declare
     job_id integer;
    begin
      dbms_job.submit(job_id,'proc_insert(''10'',''1'',''1'');',to_date('6.12.06 12:00:00','mm.dd.yy hh24:mi:ss'),'sysdate+12');
      commit;
    end;
      

  4.   

    这段程序放在那里?在12:00:00 执行
      declare
     job_id integer;
    begin
      dbms_job.submit(job_id,'proc_insert(''10'',''1'',''1'');',to_date('6.12.06 12:00:00','mm.dd.yy hh24:mi:ss'),'sysdate+12');
      commit;
    end;
      

  5.   

    在Oracle 中执行就行了。
    它是一个任务
    在试图 user_jobs 中可以查询declare
     job_id integer;
    begin
      dbms_job.submit(job_id,'proc_insert(''10'',''1'',''1'');',to_date('6.12.06 12:00:00','mm.dd.yy hh24:mi:ss'),'to_date('6.12.06 12:00:00','mm.dd.yy hh24:mi:ss')+1');
      commit;
    end;