博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
20180304数据修正记录
阅读量:5890 次
发布时间:2019-06-19

本文共 1749 字,大约阅读时间需要 5 分钟。

--对采购为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')

本文转自 qvodnet 51CTO博客,原文链接:http://blog.51cto.com/bks2015/2084504

转载地址:http://zubsx.baihongyu.com/

你可能感兴趣的文章
mysql书外键_[转] mysql 外键(Foreign Key)的详解和实例
查看>>
mysql存储引擎模式_MySQL存储引擎
查看>>
python入门小游戏代码_【Python】Python代码实现“FlappyBird”小游戏
查看>>
mysql 5.5.57互为主从_MYSQL 5.5.18 互为主从配置成功
查看>>
mysql5002_mysql新手进阶02
查看>>
python类 del_全面了解Python类的内置方法
查看>>
前后端传图片用base64好吗_前后端分离 前台传base64的图片 tp5.1.1进行处理
查看>>
java对象的排序_Java对象排序两种方法
查看>>
java jni 原理_使用JNI技术实现Java和C++的交互
查看>>
java 重写system.out_重写System.out.println(String x)方法
查看>>
Ubuntu 12.04安装
查看>>
mysql client命令行选项
查看>>
vc遍历网页表单并自动填写提交 .
查看>>
配置ORACLE 11g绿色版客户端和PLSQL远程连接环境
查看>>
ASP.NET中 DataList(数据列表)的使用前台绑定
查看>>
Linux学习之CentOS(八)--Linux系统的分区概念
查看>>
主域控制器的安装与配置步骤与方法
查看>>
JavaScript---事件
查看>>
Android NDK入门实例 计算斐波那契数列一生成jni头文件
查看>>
c/c++性能优化--I/O优化(上)
查看>>