1#
在查询分析器中执行脚本:
delete from MS_Material where ITEM_TYPE= 0 and ITEM_ID not in (
select ITEM_ID from MS_INVBillDetail union all    
select ITEM_ID from MS_INVCheckDetail union all
select ITEM_ID from MS_AdjustProductPriceDetail union all
select SV_ITEM_ID from MS_VSCBillMRDetail union all
select ITEM_ID from MS_AssociatorSeriesPDetail union all
select ITEM_ID from MS_AssociatorlPDetail)
注:请在执行脚本前,先备份数据库。若商品资料比较多,则执行脚本完成的时间会比较长。一般情况下,都可完成清理,若执行后依然有错误,请联系在线客服协助处理。