金蝶KIS专业版在过账时出现:名称或代码在系统中已被使用

2024-11-26 09:32:02
推荐回答(1个)
回答1:

常见原因是核算项目横表中核算项目个数与 F 列不对应导致的,可通过以下语
句进行修复(直接在查询分析器针对问题账套执行即可),
select * from t_itemdetail
exec sp_cleanitemdetailvGO
update a set a.fdetailcount=b.Fcount
from t_itemdetail a join (select Fdetailid,count(*) as Fcount from t_itemdetailv
where fitemid=-1 group by Fdetailid) b
on a.fdetailid=b.fdetailid where a.fdetailcount<>b.Fcount