首页 > 其他 > 详细

20180304数据修正记录

时间:2018-03-09 11:48:57      阅读:229      评论:0      收藏:0      [点我收藏+]
--对采购为1的明细屏蔽
update jh_rkmx set spid=replace(spid,‘SPH‘,‘SPA‘) where spid in (select spid from spkfk where spmch like ‘%胶体果胶铋胶囊%‘) and hshj=1
update pf_ckmx set spid=replace(spid,‘SPH‘,‘SPA‘) where pici in (select pici from fr_jh_rkmx20180304 where spid in (select spid from spkfk where spmch like ‘%胶体果胶铋胶囊%‘) and hshj=1)
update b set b.spid=replace(b.spid,‘SPH‘,‘SPA‘) from fr_jh_rkmx20180304 a,spls_rk b where a.djbh=b.djbh and a.dj_sn=b.dj_sn
update b set b.spid=replace(b.spid,‘SPH‘,‘SPA‘) from fr_pf_ckmx20180304 a,spls_ck b where a.djbh=b.djbh and a.dj_sn=b.dj_sn
--对两条重复记录屏蔽
update jh_rkmx set spid=replace(spid,‘SPH‘,‘SPA‘) where djbh in (‘JHCYMA00005703‘,‘JHAYMA00037099‘)
update spls_rk set spid=replace(spid,‘SPH‘,‘SPA‘) where djbh in (‘JHCYMA00005703‘,‘JHAYMA00037099‘)

update jh_rkhz set djbh=replace(djbh,‘JHAY‘,‘JHYA‘) where djbh in (‘JHCYMA00005703‘,‘JHAYMA00037099‘)
update jh_rkhz set djbh=replace(djbh,‘JHCY‘,‘JHYC‘) where djbh in (‘JHCYMA00005703‘,‘JHAYMA00037099‘)

--对调拨数据屏蔽
update spls_rk set spid=replace(spid,‘SPH‘,‘SPA‘) where djbh in (‘CDBYMA00056070‘)
update spls_ck set spid=replace(spid,‘SPH‘,‘SPA‘) where djbh in (‘CDBYMA00056070‘)

--一键恢复所有数据
update spls_rk set spid=replace(spid,‘SPA‘,‘SPH‘) where spid not like ‘sph%‘
update spls_ck set spid=replace(spid,‘SPA‘,‘SPH‘) where spid not like ‘sph%‘
update jh_rkmx set spid=replace(spid,‘SPA‘,‘SPH‘) where spid not like ‘sph%‘
update pf_ckmx set spid=replace(spid,‘SPA‘,‘SPH‘) where spid not like ‘sph%‘
update jh_rkhz set djbh=replace(djbh,‘JHYA‘,‘JHAY‘) where djbh in (‘JHCYMA00005703‘,‘JHYAMA00037099‘)
update jh_rkhz set djbh=replace(djbh,‘JHYC‘,‘JHCY‘) where djbh in (‘JHYCMA00005703‘,‘JHAYMA00037099‘)

20180304数据修正记录

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

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