首页 > 其他 > 详细

对D400117一些数据修改记录

时间:2018-05-08 22:59:40      阅读:237      评论:0      收藏:0      [点我收藏+]
update pf_ckmx set rq=‘2018-01-14‘ where djbh=‘XSCYMA00029873‘
update pf_ckhz set rq=‘2018-01-14‘ where djbh=‘XSCYMA00029873‘
update cwk set rq=‘2018-01-14‘ where djbh=‘XSCYMA00029873‘
update spls_ck set rq=‘2018-01-14‘ where djbh=‘XSCYMA00029873‘
update mxysyf set rq=‘2018-01-14‘ where djbh=‘XSCYMA00029873‘
update wlzhk set rq=‘2018-01-14‘ where djbh=‘XSCYMA00029873‘
--只对部分数据进行修改没有修改毛利和成本
update a set a.chkshl=b.chkshl,a.pihao=b.pihao,a.xshe=b.xshe,a.xshje=b.xshje from spls_ck a,fr_splsk_ckgjb20180508xg b where a.djbh=b.djbh and a.spid=b.spid
update a set a.shl=b.shl,a.dj=b.dj,a.hshj=b.hshj,a.lingsshl=b.lingsshl,a.pihao=b.pihao,a.sxrq=b.sxrq,a.baozhiqi=b.baozhiqi,a.hsje=b.hsje,a.je=b.je,a.she=b.she from pf_ckmx a,fr_pf_ckmxgjb20180508xg b where a.djbh=b.djbh and a.spid=b.spid

select djbh,sum(je) je,sum(she) she,sum(hsje) hsje into #2 from pf_ckmx where djbh in (select djbh from fr_pf_ckmxgjb20180508xg) group by djbh
update a set a.she=b.she,a.hsje=b.hsje,a.je=b.je from fr_pf_ckhzgjb20180508xg a,#2 b where a.djbh=b.djbh

update a set a.hsje=b.hsje,a.je=b.je,a.she=b.she from pf_ckhz a,fr_pf_ckhzgjb20180508xg b where a.djbh=b.djbh

--还原
update a set a.chkshl=b.chkshl,a.pihao=b.pihao,a.xshe=b.xshe,a.xshje=b.xshje from spls_ck a,fr_splsk_ckgjb20180508 b where a.djbh=b.djbh and a.spid=b.spid
update a set a.shl=b.shl,a.pihao=b.pihao,a.sxrq=b.sxrq,a.baozhiqi=b.baozhiqi,a.hsje=b.hsje,a.je=b.je,a.she=b.she from pf_ckmx a,fr_pf_ckmxgjb20180508 b where a.djbh=b.djbh and a.spid=b.spid

update a set a.hsje=b.hsje,a.je=b.je,a.she=b.she from pf_ckhz a,fr_pf_ckhzgjb20180508 b where a.djbh=b.djbh

对D400117一些数据修改记录

原文:http://blog.51cto.com/bks2015/2114181

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!