notepad++ 文本替换功能,解决excel批量修改数据库的数据操作

^ \(' 开始
\t ',' 制表符
$ '\) 行末

复制出来之后,使用文本替换功能,转换为SQL,添加到临时表中。然后多表关联修改。


SELECT COUNT(*) FROM orderno; # 933行
# 单个
UPDATE account_log t1,orderno t2 SET t1.`flag`=1 WHERE t1.`order_no`=t2.`order_no` AND t1.`income_type`=4 AND t1.`order_no`='557083624061';
# 批量 共 932 行受到影响
UPDATE account_log t1,orderno t2 SET t1.`flag`=1 WHERE t1.`order_no`=t2.`order_no` AND t1.`income_type`=4;


160308.txt

posted @ 2016-05-03 11:08  全新时代-小小程序员大梦想  阅读(2454)  评论(0编辑  收藏  举报