U6普及版(原u8普及版3.0)
包装物退回参照不到没有退回的包装物
问题现象: 8.11升级到普及3.0,升级后包装物做退回时看不到以前数据,看过数据库里相对应的表没有记录!
原因分析: 原老版本包装物年结不结转,升级后导致看不到上年还没有退回的包装物!
解决方案: 1、先做好数据备份 2、打开SQL查询分析器打ufdata_010_2007这个数据库 3、然后执行下面的脚本 INSERT INTO ufdata_010_2008..SA_WrapLease(bIWLType, cWLCode, cCusCode, cDLCode, cSBVCode, cInvCode, dDate, iWLAmount, iWLMoney, cReceiver, iHandBackAmount, iHandBackMoney, cMemo, cHandler, DLID, cDepCode, SBVID, cItemCode, cItem_class, iVTid) Select bIWLType, cWLCode, cCusCode, cDLCode, cSBVCode, cInvCode, dDate, iWLAmount, iWLMoney, cReceiver, iHandBackAmount, iHandBackMoney, cMemo, cHandler, DLID, cDepCode, SBVID, cItemCode, cItem_class, iVTid from SA_WrapLease where cwlcode in ( SELECT SA_WrapLease_1.cWLCode FROM SA_WrapLease AS SA_WrapLease_1 LEFT JOIN SA_WrapLease ON SA_WrapLease_1.cWLCode = SA_WrapLease.cWLCode Where SA_WrapLease.bIWLType = 1 GROUP BY SA_WrapLease_1.cWLCode having Sum([SA_WrapLease_1].[iWLAmount])-Sum([SA_WrapLease_1].[iHandBackAmount])>0 ) |