阳光网驿-企业信息化交流平台【DTC零售连锁全渠道解决方案】

 找回密码
 注册

QQ登录

只需一步,快速开始

扫描二维码登录本站

手机号码,快捷登录

老司机
查看: 2969|回复: 6

[讨论] 批量修改货品资料的类别

[复制链接]
  • TA的每日心情
    开心
    2013-8-8 14:18
  • 签到天数: 9 天

    [LV.3]偶尔看看II

    发表于 2008-10-23 16:59:33 | 显示全部楼层 |阅读模式
    用ERP一个一个改,太慢. 整了个批量更改货品类别的代码.大家可以参考下.本来要好多天才能完成的9000多种商品资料修改类别的工作,结果,不到半天就全改完了。极大的提高了效率
    基本原理是,找到货品类别的ID,然后先把所有商品都归到一个小类中,再分离出,名字相似的为另一个小类..
    如我的,先把所有的油漆归为辅料类,然后开始一句一句地分离出汽车漆、津彩、津卫等漆为品牌漆这个小类别。最后再手工大致看下看有没分错类别的。

    1. 油漆:
    2. use sd201n_2008;update goods set goodstypeid='7'  where [goodstypeid] ='1'
    3. use sd201n_2008;update goods set goodstypeid='6'  where [goodstypeid] ='7' and [name] like '%汽车漆%'
    4. use sd201n_2008;update goods set goodstypeid='6'  where [goodstypeid] ='7' and [name] like '%调和漆%'
    5. use sd201n_2008;update goods set goodstypeid='6'  where [goodstypeid] ='7' and [name] like '%津彩%'
    6. use sd201n_2008;update goods set goodstypeid='6'  where [goodstypeid] ='7' and [name] like '%津卫%'
    7. use sd201n_2008;update goods set goodstypeid='6'  where [goodstypeid] ='7' and [name] like '%必劲%'
    8. use sd201n_2008;update goods set goodstypeid='6'  where [goodstypeid] ='7' and [name] like '%五一%'
    9. use sd201n_2008;update goods set goodstypeid='6'  where [goodstypeid] ='7' and [name] like '%必丽%'
    10. use sd201n_2008;update goods set goodstypeid='6'  where [goodstypeid] ='7' and [name] like '%圣君%'
    11. use sd201n_2008;update goods set goodstypeid='6'  where [goodstypeid] ='7' and [name] like '%ATC%'
    12. use sd201n_2008;update goods set goodstypeid='6'  where [goodstypeid] ='7' and [name] like '%来威%'
    13. use sd201n_2008;update goods set goodstypeid='6'  where [goodstypeid] ='7' and [name] like '%三棵树%'
    14. use sd201n_2008;update goods set goodstypeid='6'  where [goodstypeid] ='7' and [name] like '%华润%'
    15. use sd201n_2008;update goods set goodstypeid='6'  where [goodstypeid] ='7' and [name] like '%美乐士%'
    16. use sd201n_2008;update goods set goodstypeid='6'  where [goodstypeid] ='7' and [name] like '%中亲%'
    17. use sd201n_2008;update goods set goodstypeid='6'  where [goodstypeid] ='7' and [name] like '%展辰%'
    18. use sd201n_2008;update goods set goodstypeid='6'  where [goodstypeid] ='7' and [name] like '%大钢685%'
    19. use sd201n_2008;update goods set goodstypeid='6'  where [goodstypeid] ='7' and [name] like '%双月双组分漆%'

    20. use sd201n_2008;update goods set goodstypeid='7'  where [name] like '%爱国者砂%'



    21. 五金:
    22. use sd201n_2008;update goods set goodstypeid='10'  where [goodstypeid] ='2'

    23. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%扳手%'
    24. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%钳%'
    25. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%锤%'
    26. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%锉%'
    27. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%尺%'
    28. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%鸡尾锯%'
    29. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%锯弓%'
    30. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%锯套扳%'
    31. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%螺丝刀%'
    32. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%螺刀%'
    33. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%套筒%'
    34. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%玻璃刀%'
    35. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%钻头%'
    36. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%千斤%'
    37. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%钢钎%'
    38. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%掀%'
    39. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%鸟刨%'
    40. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%铲%'
    41. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%钻头%'
    42. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%木刨%'
    43. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%泥抹%'
    44. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%线坠%'
    45. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%拉铆枪%'
    46. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%划针%'
    47. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%墨斗%'
    48. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%烙铁%'
    49. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%气筒%'
    50. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%扩孔器%'
    51. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%梯%'
    52. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%焊把%'
    53. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%斧%'
    54. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%瓦刀%'
    55. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%剪%'
    56. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%仲兴%'
    57. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%面罩%'
    58. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%连套%'
    59. use sd201n_2008;update goods set goodstypeid='8'  where [goodstypeid] ='10' and [name] like '%镊%'



    60. 家俱类:
    61. use sd201n_2008;update goods set goodstypeid='9'  where [goodstypeid] ='10' and [name] like '%拉手%'
    62. use sd201n_2008;update goods set goodstypeid='9'  where [goodstypeid] ='10' and [name] like '%移门%'
    63. use sd201n_2008;update goods set goodstypeid='9'  where [goodstypeid] ='10' and [name] like '%夹板%'
    64. use sd201n_2008;update goods set goodstypeid='9'  where [goodstypeid] ='10' and [name] like '%拉杆%'
    65. use sd201n_2008;update goods set goodstypeid='9'  where [goodstypeid] ='10' and [name] like '%扣手%'
    66. use sd201n_2008;update goods set goodstypeid='9'  where [goodstypeid] ='10' and [name] like '%包角%'
    67. use sd201n_2008;update goods set goodstypeid='9'  where [goodstypeid] ='10' and [name] like '%包边%'
    68. use sd201n_2008;update goods set goodstypeid='9'  where [goodstypeid] ='10' and [name] like '%床花%'
    69. use sd201n_2008;update goods set goodstypeid='9'  where [goodstypeid] ='10' and [name] like '%纹纸%'
    70. use sd201n_2008;update goods set goodstypeid='9'  where [goodstypeid] ='10' and [name] like '%凌形%'
    71. use sd201n_2008;update goods set goodstypeid='9'  where [goodstypeid] ='10' and [name] like '%铁扣%'
    72. use sd201n_2008;update goods set goodstypeid='9'  where [goodstypeid] ='10' and [name] like '%明扣%'
    73. use sd201n_2008;update goods set goodstypeid='9'  where [goodstypeid] ='10' and [name] like '%暗扣%'
    74. use sd201n_2008;update goods set goodstypeid='9'  where [goodstypeid] ='10' and [name] like '%猫眼%'
    75. use sd201n_2008;update goods set goodstypeid='9'  where [goodstypeid] ='10' and [name] like '%木梢%'
    76. use sd201n_2008;update goods set goodstypeid='9'  where [goodstypeid] ='10' and [name] like '%木棒%'
    77. use sd201n_2008;update goods set goodstypeid='9'  where [goodstypeid] ='10' and [name] like '%门顶%'
    78. use sd201n_2008;update goods set goodstypeid='9'  where [goodstypeid] ='10' and [name] like '%铅笔%'
    79. use sd201n_2008;update goods set goodstypeid='9'  where [goodstypeid] ='10' and [name] like '%门吸%'

    80. 设定:停用的商品归为停用类:
    81. use sd201n_2008;update goods set goodstypeid='4'  where [closed] ='T'
    复制代码
    楼主热帖
    启用邀请码注册,提高发帖质量,建设交流社区
  • TA的每日心情
    慵懒
    2013-9-1 10:27
  • 签到天数: 61 天

    [LV.6]常住居民II

    发表于 2008-10-23 19:49:54 | 显示全部楼层
    好像在同一个数据库上操作哦。一个
    use sd201n_2008 :
    go
    .....
    go
    不行吗? 我也是新人 交流下

    评分

    参与人数 1稿费 +1 收起 理由
    lookice + 1 问题交流奖励

    查看全部评分

    启用邀请码注册,提高发帖质量,建设交流社区
  • TA的每日心情
    开心
    2013-8-8 14:18
  • 签到天数: 9 天

    [LV.3]偶尔看看II

     楼主| 发表于 2008-10-24 14:00:13 | 显示全部楼层
    嘿嘿。 是啊。 偷懒,下句复制上句的。。。然后稍微改下就继续了。。
    启用邀请码注册,提高发帖质量,建设交流社区
  • TA的每日心情
    开心
    2019-9-12 07:47
  • 签到天数: 106 天

    [LV.6]常住居民II

    发表于 2008-11-16 01:21:20 | 显示全部楼层
    重要提醒:任何对后台的修改,首要备份数据!其次保留数据库操作语句!不然哭都来不急!
    本帖子由阳光论坛管理组成员答复[增加管理津贴4个]

    打造出国内一流的行业软件应用交流论坛--阳光网驿助力企业信息化
    启用邀请码注册,提高发帖质量,建设交流社区
  • TA的每日心情
    擦汗
    2019-3-16 09:46
  • 签到天数: 1434 天

    [LV.10]以坛为家III

    发表于 2008-11-25 09:14:39 | 显示全部楼层

    疑问

    如果这样改了,会出现数据库质疑吗??
    启用邀请码注册,提高发帖质量,建设交流社区
  • TA的每日心情
    难过
    2016-6-22 13:25
  • 签到天数: 7 天

    [LV.3]偶尔看看II

    发表于 2008-11-25 10:05:39 | 显示全部楼层
    提醒:说明你的ERP是什么软件的什么版本?你这样发出来,没有一点意义!
    本帖子由阳光论坛管理组成员答复[增加管理津贴4个]

    打造出国内一流的行业软件应用交流论坛--阳光网驿助力企业信息化
    启用邀请码注册,提高发帖质量,建设交流社区
  • TA的每日心情
    开心
    2017-7-22 01:39
  • 签到天数: 113 天

    [LV.6]常住居民II

    发表于 2008-12-16 11:33:14 | 显示全部楼层
    帮楼主补充,是以速达3000系列软件为例的
    启用邀请码注册,提高发帖质量,建设交流社区
    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    快速回复 返回顶部 返回列表