在使用KIS專業版進行憑證過帳時,提示"名稱或代碼在系統中已被使用"(錯誤代碼:3604 E14H)
如果提示F1
備份賬套后,執行以下SQL后,再過賬:
update d set d.fdetailcount=v.fcount from t_ItemDetail d,
(select fdetailid,count(*) fcount from t_ItemDetailv where fitemid=-1 group by fdetailid ) v
where d.fdetailid=v.fdetailid
如果提示F2
select * from t_itemdetail
exec sp_cleanitemdetailv
GO
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