解决方案: |
1、先做好数据备份!
2、打上U860HOTFIX及固定资产最新补丁。
UPDATE fa_DeprTransactions
SET fa_DeprTransactions.lDeprMonths11 = (year('2003-11-01') - year(fa_Cards.dStartdate))
* 12 + (month('2003-11-01') - month(fa_Cards.dStartdate)) - 1
FROM fa_DeprTransactions, fa_Cards
WHERE fa_Cards.sCardNum = fa_DeprTransactions.sCardNum AND
fa_Cards.dDisposeDate IS NULL AND
fa_DeprTransactions.lDeprMonths11 < fa_Cards.lLife AND
fa_Cards.sDeprMethodID <> 1
UPDATE fa_DeprTransactions
SET fa_DeprTransactions.lDeprMonths11 = 0
FROM fa_DeprTransactions, fa_Cards
WHERE fa_Cards.sCardNum = fa_DeprTransactions.sCardNum
AND (fa_Cards.sDeprMethodID=1 or fa_Cards.iInputPeriod=11)
|