原SQL执行情况:
SQL>update usr_wms_city.con_content x set x.qty =(
selectnvl(j.qty,0)from (select locno,a.cell_no,a.size_no,a.item_no,a.barcode,a.item_type,a.quality,max(a.createtm)createtm,sum(a.qty)qty fromusr_wms_city.con_content awhere (a.instock_qty=0 or a.outstock_qty=0)
group by locno,a.cell_no,a.size_no,a.item_no,a.barcode,a.item_type,a.quality having count(1)>1)j
where x.locno=j.locno and x.cell_no=j.cell_no and x.item_no=j.item_no and x.size_no=j.size_no
and x.barcode=j.barcode
and x.item_type=j.item_type and x.quality=j.quality and x.createtm=j.createtm)
where exists(select * from (select locno,a.cell_no,a.size_no,a.item_no,a.barcode,a.item_type,a.quality,min(a.createtm)createtm
from usr_wms_city.con_content a
where (a.instock_qty=0 or a.outstock_qty=0)
group by locno,a.cell_no,a.size_no,a.