金蝶KIS专业版提示:违反primary key 约束,不能在表中插入重复值
新增凭证时提示“违反primary key 约束,不能在表t_voucher 中插入重复值” Use AIS2009###### --(指问题账套的账套号)
第一,删除凭证孤立记录 Delete from t_voucherentry where fvoucherid not in (select fvoucherid from t_voucher)--删除凭证体中孤立记录 delete from t_voucher where fvoucherid not in (select fvoucherid from t_voucherentry)--删除凭证头表中孤立记录
第二,更改自动编码步长表中记录 Update t_identity set fnext=(select max(fvoucherid) from t_voucher)+1 where fname='t_voucher'
|