|
create or replace procedure COEX is
v_curbal number(19,2);
v_lentdt varchar2(8);
flag1 varchar2(1);
flag2 varchar2(1);
cursor sou_inst is
select sou.flag,list.flag,sou.depbal_d,sou.lentdt from coex_trd_term_list list,coex_sou_nacs_d sou
where list.flag!='S'
and list.orgid=sou.orgid
and list.cust_code=sou.cust_code
and list.apcode=sou.apcode
and list.curcde=sou.curcde
and list.pro_pk=sou.pro_pk
and list.papcde=sou.papcde
for update;
begin
open sou_inst;
loop
fetch sou_inst into flag1,flag2,v_curbal,v_lentdt;
exit when sou_inst %notfound;
update coex_sou_nacs_d
set flag='1'
where current of sou_inst;
end loop;
close sou_inst;
commit;
end COEX;
红字部分没用效果,请问是那里有问题? |
|