实施 #2767
历史记录
由 夏书焱 15979948259 更新于 大约 2 个月 之前
select f.inpatient_no, f.pub_cost,f.ybjbct,f.ybdbjjzf,f.ybmzjz,f.ybzgde,f.ybgwybzl,f.ybqtzf,f.*,f.rowid
from fin_ipr_siinmaininfo f
where f.balance_date between
TO_DATE('2024-01-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss') and
TO_DATE('2024-02-29 23:59:59', 'yyyy-mm-dd hh24:mi:ss')
and (f.extstr5 in '360200' or '360200' = '360200')
and f.valid_flag = '1'
and f.balance_state = '1'
and f.extstr4 not in ('9901', '9902')
--and f.pub_cost + f.pay_cost != 0
and f.medical_type='14'
and f.ybtype = '310'
and (f.ybjbct+f.ybdbjjzf+f.ybmzjz+f.ybzgde+f.ybgwybzl+f.ybqtzf)<>f.pub_cost
update fin_ipr_siinmaininfo f
set f.ybgwybzl =
(f.pub_cost - f.ybjbct)
where f.balance_date between
TO_DATE('2024-01-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss') and
TO_DATE('2024-02-29 23:59:59', 'yyyy-mm-dd hh24:mi:ss')
and (f.extstr5 in '360200' or '360200' = '360200')
and f.valid_flag = '1'
and f.balance_state = '1'
and f.extstr4 not in ('9901', '9902')
--and f.pub_cost + f.pay_cost != 0
and f.medical_type = '14'
and f.ybtype = '310'
and (f.ybjbct + f.ybdbjjzf + f.ybmzjz + f.ybzgde + f.ybgwybzl + f.ybqtzf) <>f.pub_cost