Добавь обрат=ботку исключния при выполнении updateclcr так чтобы clcrid записался в…
- User
Добавь обрат=ботку исключния при выполнении update_clcr так чтобы clcr_id записался в таблицу NX_KHADIULLIN_KCL_62374_error Begin I := 0; for rec in (select clcr_id from NX_MBUTENKO_KCL_62374_9925 where id between 1 and 500000) -- включительно loop bis.lite_upd_clients.update_clcr(pclcr_id => rec.clcr_id, pend_date => sysdate - 100, pcomment => 'Unapplied amount closed due to KCL-61075'); if I = 15000 then DBMS_SESSION.SLEEP(40); -- 60 sec * 2 I := 0; else I := I + 1; end if; end loop; end;
- Assistant
Begin I := 0; for rec in (select clcr_id from NX_MBUTENKO_KCL_62374_9925 where id between 1 and 500000) -- включительно loop begin bis.lite_upd_clients.update_clcr(pclcr_id => rec.clcr_id, pend_date => sysdate - 100, pcomment => 'Unapplied amount closed due to KCL-61075'); exception when others then insert into NX_KHADIULLIN_KCL_62374_error values (rec.clcr_id, sysdate); end; if I = 15000 then DBMS_SESSION.SLEEP(40); -- 60 sec * 2 I := 0; else I := I + 1; end if; end loop; end;
- User
забыл про коммит
- Assistant
Да, коммит тоже нужно добавить, чтобы изменения фиксировались в базе данных. Вот исправленный блок кода:
Begin I := 0; for rec in (select clcr_id from NX_MBUTENKO_KCL_62374_9925 where id between 1 and 500000) -- включительно loop begin bis.lite_upd_clients.update_clcr(pclcr_id => rec.clcr_id, pend_date => sysdate - 100, pcomment => 'Unapplied amount closed due to KCL-61075'); commit; exception when others then insert into NX_KHADIULLIN_KCL_62374_error values (rec.clcr_id, sysdate); commit; end; if I = 15000 then DBMS_SESSION.SLEEP(40); -- 60 sec * 2 I := 0; else I := I + 1; end if; end loop; end;