ORACLE利⽤游标批量插⼊begin
for cr in (
select
x03.xsddhm
from xst03 x03
left join kct98 t98
on t98.xsddhm = x03.xsddhm
left join kcm07 m7
on t98.kccxdm = m7.kccxdm
and t98.kcppai = m7.kcppai
left join kcm05 m5
on m7.kcxlie = m5.kcxlie
and m7.kcppai = m5.kcppai
left join xst34 x34
on x03.xsddhm = x34.xskhdd
left join xsm12 m12
on x03.xsjslx = m12.xsjsdm
where1=1
and x03.xsddzt in ('F', 'G')
and x03.xspczt ='C'
and x34.xspzph is null
and m12.xszjlx ='ZS'
and x03.kcppai ='ORV'
and x03.xspcrq >20140602
AND t98.kcckrq<20190601 )
loop
insert into xst34 values ('00',cr.xsddhm,null,null);
end loop;
oracle游标的使用commit;
end;

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。