码迷,mamicode.com
首页 > 其他好文 > 详细

保险数据调整结转前后处理

时间:2017-02-05 14:13:46      阅读:147      评论:0      收藏:0      [点我收藏+]

标签:时空 流向修改


结转前因结转不涉及余额未对wlzhk余额处理

select * into fr_wlzhk20170123 from wlzhk where left(dwbh,3)<>‘DWI‘

update wlzhk set dwbh=replace(dwbh,‘CWI‘,‘DWI‘) where left(dwbh,3)<>‘DWI‘

update wlzhk set dwbh=replace(dwbh,‘EWI‘,‘DWI‘) where left(dwbh,3)<>‘DWI‘

select * into fr_spls_ck20170123 from spls_ck where left(dwbh,3)<>‘DWI‘ and dwbh<>‘‘

update spls_ck set dwbh=replace(dwbh,‘CWI‘,‘DWI‘) where left(dwbh,3)<>‘DWI‘ and dwbh<>‘‘



select * into fr_spls_rk20170123 from spls_rk where left(spid,3)<>‘SPH‘

update spls_rk set spid=replace(spid,‘APH‘,‘SPH‘) where left(spid,3)<>‘SPH‘


select * into fr_mxysyf20170123 from mxysyf where left(dwbh,3)<>‘DWI‘

update mxysyf set dwbh=replace(dwbh,‘CWI‘,‘DWI‘) where left(dwbh,3)<>‘DWI‘

insert into fr_mxysyf20170123

select * from mxysyf where left(spid,3)<>‘SPH‘

update mxysyf set spid=replace(spid,‘APH‘,‘SPH‘) where left(spid,3)<>‘SPH‘


select * from fr_mxysyf20170123


结转后mxysyf为了勾兑未恢复,勾兑完结转后会自动清除

update b set b.dwbh=a.dwbh from spls_ck b,fr_spls_ck20170123 a where a.plh=b.plh

update b set b.spid=a.spid from spls_rk b,fr_spls_rk20170123 a where a.plh=b.plh

update b set b.dwbh=a.dwbh from wlzhk b,fr_wlzhk20170123 a where a.plh=b.plh


保险数据调整结转前后处理

标签:时空 流向修改

原文地址:http://bks2015.blog.51cto.com/9847303/1894965

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!