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



create or replace procedure do_update
is
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;
begin

v_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;


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值