解决方案: |
您好: 请先进行数据备份。 无法升级的原因是由于手工从存货档案表inventory中删除了记录造成的。因为其他的表,INVENTORY_1,INVENTORY_2,IA_SUMMARY,IA_VALUATIONASS,CURRENTSTOCK还存在相关记录。我们需要将这些记录清空才可以进行升级。 下面是不对应的记录 SELECT Inventory_1.cInvCode FROM Inventory RIGHT JOIN Inventory_1 ON Inventory.cInvCode = Inventory_1.cInvCode WHERE Inventory.cInvCode IS NULL; /*下面是删除方法,清除存货档案—2*/ DELETE * FROM Inventory_2 WHERE CINVCODE IN (SELECT * FROM AA); /*下面是删除方法,清除存货总帐*/ DELETE * FROM IA_SUMMARY WHERE CINVCODE IN (SELECT * FROM AA); /*下面是删除方法,清除辅助计价表*/ DELETE * FROM IA_VALUATIONASS WHERE CINVCODE IN (SELECT * FROM AA); /*下面是删除方法,清除现存量表*/ DELETE * FROM CURRENTSTOCK WHERE CINVCODE IN (SELECT * FROM AA); /*下面是删除方法,清除存货档案—1*/ DELETE * FROM Inventory_1 WHERE CINVCODE IN (SELECT * FROM AA); 然后再进行数据升级。 |