下面为SQL中语句:
update b set b.qtydr_amt=case when a.数量>0 then 数量 else 0 end 
from gl_bal b,(select co_code,acc_code,fiscal,acc_item5,sum(qtydr_amt)-sum(qtycr_amt) 数量 from gl_bal group by co_code,fiscal,acc_item5,acc_code) a
where b.acc_code=a.acc_code and b.co_code=a.co_code and b.acc_item5=a.acc_item5 and b.fiscal=a.fiscal+1 and b.fis_perd='0'
order by b.co_code,b.acc_code,b.acc_item5要求转换为oracle数据库语法!