标签:时空 流向修改
结转前因结转不涉及余额未对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