從批處理文件執行時,下面的代碼塊沒有運行。它只是掛起(沒有任何反應)。它坐在那裏幾個小時。我無法跟蹤問題是什麼或如何調試。請幫忙。這個PLSQL代碼塊有什麼問題
declare
v_personrefid varchar2(50);
v_hiredt date;
v_loaddt date;
v_personid number;
v1_personrefid varchar2(50);
v_seq number :=0;
cursor get_row is
select distinct personrefid from ARCHIVE_PERSON;
cursor get_row1 is
select
personrefid,
hiredt,
loaddt,
personid
from
ARCHIVE_PERSON
where
personrefid = v_personrefid
order by hiredt, loaddt;
begin
v_seq:=0;
open Get_row;
loop
fetch get_row into v_personrefid ;
exit when get_row%notfound;
begin
open get_row1;
loop
fetch get_row1 into v1_personrefid, v_hiredt, v_loaddt, v_personid;
exit when get_row1%NOTFOUND;
v_seq:= v_seq+1;
update ARCHIVE_PERSON
set version = v_seq
where
personrefid = v1_personrefid and
personid = v_personid and
hiredt = v_hiredt and
loaddt = v_loaddt;
commit;
end loop;
v_seq:=0;
close get_row1;
end;
end loop;
v_seq:=0;
close get_row;
end;
也許還嘗試創建一個日誌表,做好沿途刀片(自治區)。做這個習慣。比猜測好得多,你會知道你在處理中的位置。搜索SO這個例子 – tbone 2012-02-08 16:04:58