如何删除客户父级分类001?
- 浏览:696 - 发布时间:2005-09-05 10:19:00.0
问题版本: |
1-通2005 |
问题模块: |
9-购销存 |
所属行业: |
0-通用 |
问题状态: |
1-UU通注册用户 |
关 键 字: |
删除档案 |
适用产品: |
通2005、财务通 |
补 丁 号: |
|
开放状态: |
0-UU通注册用户 |
原问题号: |
|
提交时间: |
2005-9-5 10:19:00 |
问题名称: |
如何删除客户父级分类001? |
问题现象: |
客户分类表CustomerClass 、客户表customer有关联关系不能在数据库中直接修改CCCCODE值,要用脚本实现! |
原因分析: |
(客户分类级别 *** *** ***) 删除父级001分类 delete CustomerClass where ccccode = 001 insert into CustomerClass(ccccode,cccname,iccgrade,bccend) select substring(ccccode,4,3) as ccccode,cccname,iccgrade-1 as iccgrade,bccend from CustomerClass where ccccode like '001%' update customer set ccccode = substring(ccccode,4,3) where ccccode like '001%' delete CustomerClass where ccccode like '001%' |
解决方案: |
(客户分类级别 *** *** ***) 删除父级001分类 delete CustomerClass where ccccode = 001 insert into CustomerClass(ccccode,cccname,iccgrade,bccend) select substring(ccccode,4,3) as ccccode,cccname,iccgrade-1 as iccgrade,bccend from CustomerClass where ccccode like '001%' update customer set ccccode = substring(ccccode,4,3) where ccccode like '001%' delete CustomerClass where ccccode like '001%' | |