首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

施行出生日期变更记录写入

2012-07-04 
执行出生日期变更记录写入create or replace procedure do_updateisOutputFile UTL_FILE.FILE_TYPEv_resu

执行出生日期变更记录写入

create or replace procedure do_updateis  OutputFile UTL_FILE.FILE_TYPE;  v_result varchar2(2048);  v_rfid_num number;  cursor r is    select distinct h.rfid as rfid from his_animal_info h;  thedata r%rowtype;beginv_rfid_num := 0;  open r;  loop    fetch r      into thedata;    v_rfid_num := v_rfid_num + 1;    OutputFile := utl_file.fopen('background_dump_dest','birthdayhis.log','a');    utl_file.putf(OutputFile,v_rfid_num);    utl_file.fflush(OutputFile);    utl_file.fclose(OutputFile);        get_BirthdayHis_By_RFID(thedata.rfid,v_result);    if (v_result is not null) then      update tbl_animal_info a         set a.birthday_his = v_result       where a.rfid = thedata.rfid;      commit;    end if;  end loop;  end;

热点排行