金蝶云
郴州金蝶软件—金蝶专业版提示违反违反了PRIMARYKEY约束
来源: | 作者:黄飞 | 发布时间: 2022-10-26 | 610 次浏览 | 分享到:
郴州金蝶软件—金蝶专业版提示违反违反了PRIMARYKEY约束

金蝶提示违反违反了PRIMARY KEY约束,PK_POZnvBal,不能在对象POinvBal中插入重复键

原因:一是部份物料已经不存在,二是表中存在有以后期间的记录

解决方案

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中插入重复键处理方法

SELECT * FROM IcBal WHERE Fyear=2010 and Fperiod=10

DELETE FROM IcBal WHERE Fyear=2010and Fperiod=10

SELECT * FROM IcinvBal WHERE Fyear=2010 and Fperiod=10

DELETE FROM IcinvBal WHERE Fyear=2010and Fperiod=10

关于郴州金蝶软件


主要负责郴州地区金蝶软件、用友软件、财务软件、OA办公自动化、进销存管理软件、HR人力资源系统、定制开发等,销售及服务工作


更多技术服务信息,请访问:http://www.czjdyerp.com或咨询我公司技术服务QQ:380911664


销售咨询电话:0735-2885869


如需上门服务请联系我公司技术服务QQ:380911664或电话咨询:13319678383(微信同号)


更多