期末结账 提示违反了PRIMARY KEY约束,不能插入重复键处理方法
1人赞赏了该文章
2397次浏览
编辑于2021年02月26日 16:15:19
不光是这个 还有可能是icbal表等多个表。 注意先备份帐套
--解决方案
delete from poinvbal where fitemid not in (select fitemid from t_icitem)
delete from poinvbal where fyear=(
select fvalue from t_systemprofile where fcategory='ic' and fkey='currentyear'
) and fperiod>(select fvalue from t_systemprofile where fcategory='ic' and fkey='currentperiod')
--例如:违反了PRIMARY KEY约束,PK_ICInvBal,不能在对象ICinvBal中插入重复键处理方法
本文转载自:CSDN
作者:恶魔的幻影
原文链接:https://blog.csdn.net/aqiang566971/article/details/104577430
推荐阅读