[原创] 管家婆辉煌系列年结存后无法删除基本信息的重要语句

管家婆辉煌系列年结存后无法删除基本信息的重要语句

先备份数据库  然后在查询分析执行以下脚本

--无法删除基本信息使用的语句:
delete from bakdly where vchcode not in(select vchcode from dlyndx where draft=1)
delete from dlyndx where draft = 3
delete from lendborrow where qty=0 and total=0
delete from lendborrow00 where qty=0 and total=0
delete from IniCommission where qty=0 and total=0 and costtotal=0
delete from Commission where qty=0 and total=0 and costtotal=0
delete from Inigoodsstocks where qty=0 and total=0
delete from goodsstocks where qty=0 and total=0
--根据客户需要删除的信息:
delete from price where ptypeid not in (select ptypeid from inigoodsstocks)
--delete from price
delete from PTYPEPRODURENDX   --生产组装单索引
delete from PTYPEPRODUREDLY   --生产组装单明细
delete from CheckedCount      --库存盘点
delete from goodswar          --库存上下限报警
delete from SN                --商品序列号
delete from ZeroGoods         --0库存商品
delete from BakDlymen         --门店草稿单
delete from bakdlyorder       --删除订单
督查评语 by winshine@ 2008-4-25 08:14
请懂SQL的朋友做出回复后再加分

TOP

测试步骤:
1.将帐套进行系统重建,删除商品基本信息提示如图1.
2.打开SQL查询分析器执行前半部分命令,显示如图2.
3.重新进入帐套删除商品基本信息无法删除,如图3.
4.打开SQL查询分析器执行后半部分命令,如图4.5.
5.再次进帐套删除商品基本信息成功。如图6.




零位空间论坛温馨提示:您无权查看/下载本附件 Http://www.0wei.com

TOP

发新话题