解决方案: |
参照执行如下脚本即可:注意根据实际帐套信息修改脚本中的帐套号及UFDATA数据库名称!
-- 检查、修改ufsystem
SELECT *
FROM ufsystem..UA_Identity
WHERE (cAcc_Id = '004')
AND (cVouchType = 'xj')
update ufsystem..UA_Identity
set ifatherid=(SELECT max(ccancelno) FROM ufdata_004_2004..ap_closebill)
WHERE (cAcc_Id = '004')
AND (cVouchType = 'xj')
update ufsystem..UA_account_sub
set bclosing=1
where cacc_id='004'
and (csub_id='AR' or csub_id='SA')
AND iyear=2003
--修改AP_Closebill
update a
set ccheckman=null
from ap_closebill a,salebillvouch b
where b.bpayment=a.ccancelno
and b.bpayment is not null
and b.cVerifier is null
and a.cCheckMan is not null
注意做好帐套数据备份!! |