TA的每日心情 | 开心 2013-8-8 14:18 |
---|
签到天数: 9 天 [LV.3]偶尔看看II
|
用ERP一个一个改,太慢. 整了个批量更改货品类别的代码.大家可以参考下.本来要好多天才能完成的9000多种商品资料修改类别的工作,结果,不到半天就全改完了。极大的提高了效率
基本原理是,找到货品类别的ID,然后先把所有商品都归到一个小类中,再分离出,名字相似的为另一个小类..
如我的,先把所有的油漆归为辅料类,然后开始一句一句地分离出汽车漆、津彩、津卫等漆为品牌漆这个小类别。最后再手工大致看下看有没分错类别的。
- 油漆:
- use sd201n_2008;update goods set goodstypeid='7' where [goodstypeid] ='1'
- use sd201n_2008;update goods set goodstypeid='6' where [goodstypeid] ='7' and [name] like '%汽车漆%'
- use sd201n_2008;update goods set goodstypeid='6' where [goodstypeid] ='7' and [name] like '%调和漆%'
- use sd201n_2008;update goods set goodstypeid='6' where [goodstypeid] ='7' and [name] like '%津彩%'
- use sd201n_2008;update goods set goodstypeid='6' where [goodstypeid] ='7' and [name] like '%津卫%'
- use sd201n_2008;update goods set goodstypeid='6' where [goodstypeid] ='7' and [name] like '%必劲%'
- use sd201n_2008;update goods set goodstypeid='6' where [goodstypeid] ='7' and [name] like '%五一%'
- use sd201n_2008;update goods set goodstypeid='6' where [goodstypeid] ='7' and [name] like '%必丽%'
- use sd201n_2008;update goods set goodstypeid='6' where [goodstypeid] ='7' and [name] like '%圣君%'
- use sd201n_2008;update goods set goodstypeid='6' where [goodstypeid] ='7' and [name] like '%ATC%'
- use sd201n_2008;update goods set goodstypeid='6' where [goodstypeid] ='7' and [name] like '%来威%'
- use sd201n_2008;update goods set goodstypeid='6' where [goodstypeid] ='7' and [name] like '%三棵树%'
- use sd201n_2008;update goods set goodstypeid='6' where [goodstypeid] ='7' and [name] like '%华润%'
- use sd201n_2008;update goods set goodstypeid='6' where [goodstypeid] ='7' and [name] like '%美乐士%'
- use sd201n_2008;update goods set goodstypeid='6' where [goodstypeid] ='7' and [name] like '%中亲%'
- use sd201n_2008;update goods set goodstypeid='6' where [goodstypeid] ='7' and [name] like '%展辰%'
- use sd201n_2008;update goods set goodstypeid='6' where [goodstypeid] ='7' and [name] like '%大钢685%'
- use sd201n_2008;update goods set goodstypeid='6' where [goodstypeid] ='7' and [name] like '%双月双组分漆%'
- use sd201n_2008;update goods set goodstypeid='7' where [name] like '%爱国者砂%'
- 五金:
- use sd201n_2008;update goods set goodstypeid='10' where [goodstypeid] ='2'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%扳手%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%钳%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%锤%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%锉%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%尺%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%鸡尾锯%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%锯弓%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%锯套扳%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%螺丝刀%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%螺刀%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%套筒%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%玻璃刀%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%钻头%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%千斤%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%钢钎%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%掀%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%鸟刨%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%铲%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%钻头%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%木刨%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%泥抹%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%线坠%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%拉铆枪%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%划针%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%墨斗%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%烙铁%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%气筒%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%扩孔器%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%梯%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%焊把%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%斧%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%瓦刀%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%剪%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%仲兴%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%面罩%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%连套%'
- use sd201n_2008;update goods set goodstypeid='8' where [goodstypeid] ='10' and [name] like '%镊%'
- 家俱类:
- use sd201n_2008;update goods set goodstypeid='9' where [goodstypeid] ='10' and [name] like '%拉手%'
- use sd201n_2008;update goods set goodstypeid='9' where [goodstypeid] ='10' and [name] like '%移门%'
- use sd201n_2008;update goods set goodstypeid='9' where [goodstypeid] ='10' and [name] like '%夹板%'
- use sd201n_2008;update goods set goodstypeid='9' where [goodstypeid] ='10' and [name] like '%拉杆%'
- use sd201n_2008;update goods set goodstypeid='9' where [goodstypeid] ='10' and [name] like '%扣手%'
- use sd201n_2008;update goods set goodstypeid='9' where [goodstypeid] ='10' and [name] like '%包角%'
- use sd201n_2008;update goods set goodstypeid='9' where [goodstypeid] ='10' and [name] like '%包边%'
- use sd201n_2008;update goods set goodstypeid='9' where [goodstypeid] ='10' and [name] like '%床花%'
- use sd201n_2008;update goods set goodstypeid='9' where [goodstypeid] ='10' and [name] like '%纹纸%'
- use sd201n_2008;update goods set goodstypeid='9' where [goodstypeid] ='10' and [name] like '%凌形%'
- use sd201n_2008;update goods set goodstypeid='9' where [goodstypeid] ='10' and [name] like '%铁扣%'
- use sd201n_2008;update goods set goodstypeid='9' where [goodstypeid] ='10' and [name] like '%明扣%'
- use sd201n_2008;update goods set goodstypeid='9' where [goodstypeid] ='10' and [name] like '%暗扣%'
- use sd201n_2008;update goods set goodstypeid='9' where [goodstypeid] ='10' and [name] like '%猫眼%'
- use sd201n_2008;update goods set goodstypeid='9' where [goodstypeid] ='10' and [name] like '%木梢%'
- use sd201n_2008;update goods set goodstypeid='9' where [goodstypeid] ='10' and [name] like '%木棒%'
- use sd201n_2008;update goods set goodstypeid='9' where [goodstypeid] ='10' and [name] like '%门顶%'
- use sd201n_2008;update goods set goodstypeid='9' where [goodstypeid] ='10' and [name] like '%铅笔%'
- use sd201n_2008;update goods set goodstypeid='9' where [goodstypeid] ='10' and [name] like '%门吸%'
- 设定:停用的商品归为停用类:
- use sd201n_2008;update goods set goodstypeid='4' where [closed] ='T'
复制代码 |
|