注册账号 登录
用友之家-用友软件论坛 返回首页

wozengcong的个人空间 https://www.oyonyou.com/?242966 [收藏] [复制] [分享] [RSS]

日志

违反了PRIMARY KEY 约束'aaaaaAp_closeBill_PK'。不能在对象'Ap_CloseBill'中插入重复 ...

已有 2256 次阅读2012-7-30 00:25 |个人分类:日常维护问题总结

Use UFDATA_002_2010  --这里要改为你的数套数据库名.
update ufsystem..ua_identity Set iFatherId=(Select Max(iid) As ID From UFDATA_002_2010..Ap_CloseBill),
iChildId=(Select Max(id) As AutoID From UFDATA_002_2010..Ap_CloseBills)
Where   cAcc_Id='002' And   cVouchType='sk'  --cAcc_Id='你的账套号'
 
您好:请备份数据后执行如下语句:注意替换为cacc_id='001' 实际账套号
update UFSystem..ua_identity  set ifatherid=(select max(iid) from ap_closebill)  where cacc_id='001' and cvouchtype='SK'
update UFSystem..ua_identity  set ichildid=(select max(id) from ap_closebills)  where cacc_id='001' and cvouchtype='SK'

路过

雷人

握手

鲜花

鸡蛋

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 注册账号

QQ|站长微信|Archiver|手机版|小黑屋|用友之家 ( 蜀ICP备07505338号|51072502110008 )

GMT+8, 2024-5-17 02:00 , Processed in 0.026834 second(s), 10 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

返回顶部