期末结账 提示违反了PRIMARY KEY约束,不能插入重复键处理方法
金蝶云社区-金蝶张二伟
金蝶张二伟
1人赞赏了该文章 2397次浏览 未经作者许可,禁止转载编辑于2021年02月26日 16:15:19
  1. 不光是这个 还有可能是icbal表等多个表。   注意先备份帐套

  2. --解决方案


  3. delete from poinvbal where fitemid not in (select fitemid from t_icitem) 


  4. delete from poinvbal where fyear=(

  5. select fvalue from t_systemprofile where fcategory='ic' and fkey='currentyear'

  6. and fperiod>(select fvalue from t_systemprofile where fcategory='ic' and fkey='currentperiod')




  7. --例如:违反了PRIMARY KEY约束,PK_ICInvBal,不能在对象ICinvBal中插入重复键处理方法



本文转载自:CSDN

作者:恶魔的幻影

原文链接:https://blog.csdn.net/aqiang566971/article/details/104577430

赞 1