用友U8 调拨单等单据审核提示 不能在具有唯一索引aa_rdrocords_pk的对象rdrecords中插入重复键的行用友U8 调拨单等单据审核提示 不能在具有唯一索引aa_rdrocords_pk的对象rdrecords中插入重复键的行
问题原因:1.--事件探查器跟踪发现--Insert Into ufdata_001_2005..Rdrecords(id,cinvcode,cbarcode,cfree1,cfree2,cfree3,cfree4,cfree5,cfree6,cfree7,cfree8,cfree9,cfree10,inquantity,innum,cbatch,cassunit,dmadedate,inum,iquantity,iunitcost,iprice,ipunitcost,ipprice,dvdate,cposition,autoid,cvouchcode,isoutquantity,isoutnum,cdefine22,cdefine23,cdefine24,cdefine25,cdefine26,cdefine27,cdefine28,cdefine29,cdefine30,cdefine31,cdefine32,cdefine33,cdefine34,cdefine35,cdefine36,cdefine37,impoids,icheckids,itrids,citemcode,citem_class,cname,citemcname,imassdate,cbvencode,cinvouchcode) Values (234296,'WP3111',NULL,'C','黑色','34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,NULL,NULL,NULL,0,1,799,799,NULL,NULL,NULL,'',1601710,NULL,0,0,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,390975,NULL,NULL,NULL,NULL,NULL,NULL,NULL)不能在具有唯一索引aa_rdrocords_pk的对象rdrecords中插入重复键的行-- Insert Into ufdata_001_2005..Rdrecords(id,cinvcode,cbarcode,cfree1,cfree2,cfree3,cfree4,cfree5,cfree6,cfree7,cfree8,cfree9,cfree10,inquantity,innum,cbatch,cassunit,dmadedate,inum,iquantity,iunitcost,iprice,ipunitcost,ipprice,dvdate,cposition,autoid,cvouchcode,isoutquantity,isoutnum,cdefine22,cdefine23,cdefine24,cdefine25,cdefine26,cdefine27,cdefine28,cdefine29,cdefine30,cdefine31,cdefine32,cdefine33,cdefine34,cdefine35,cdefine36,cdefine37,impoids,icheckids,itrids,citemcode,citem_class,cname,citemcname,imassdate,cbvencode,cinvouchcode) Values(234296,'ATS833',NULL,'0','绿色','48',NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,NULL,NULL,NULL,0,1,0,0,NULL,NULL,NULL,'',1601711,NULL,0,0,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,390976,NULL,NULL,NULL,NULL,NULL,NULL,NULL)不能在具有唯一索引aa_rdrocords_pk的对象rdrecords中插入重复键的行;说明还是最大单据号表有问题。 解决方法:1.-- select * from ua_identity where cacc_id = 001 and cVouchtype = 'rd' --iFatherID = 234295 iChildID = 1601709-- select max(id) from ufdata_001_2005..rdrecords --489878-- selexct max(id) from ufdata_001_2005..rdrecord --4898782.备份数据 \\lisheng(192.168.0.99)\d\用友备份\20050301 0944 ufsub ufsystem ufdata_001_2003 ufdata_001_2004 ufdata_001_20053.修改相应字段-- update ua_identity set ifatherid = 489878 where cacc_id = 001 and cVouchtype = 'rd'-- update ua_identity set ichildid = 489878 where cacc_id = 001 and cVouchtype = 'rd'4.验证OK
解决方案:
问题原因:1.--事件探查器跟踪发现--Insert Into ufdata_001_2005..Rdrecords(id,cinvcode,cbarcode,cfree1,cfree2,cfree3,cfree4,cfree5,cfree6,cfree7,cfree8,cfree9,cfree10,inquantity,innum,cbatch,cassunit,dmadedate,inum,iquantity,iunitcost,iprice,ipunitcost,ipprice,dvdate,cposition,autoid,cvouchcode,isoutquantity,isoutnum,cdefine22,cdefine23,cdefine24,cdefine25,cdefine26,cdefine27,cdefine28,cdefine29,cdefine30,cdefine31,cdefine32,cdefine33,cdefine34,cdefine35,cdefine36,cdefine37,impoids,icheckids,itrids,citemcode,citem_class,cname,citemcname,imassdate,cbvencode,cinvouchcode) Values (234296,'WP3111',NULL,'C','黑色','34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,NULL,NULL,NULL,0,1,799,799,NULL,NULL,NULL,'',1601710,NULL,0,0,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,390975,NULL,NULL,NULL,NULL,NULL,NULL,NULL)不能在具有唯一索引aa_rdrocords_pk的对象rdrecords中插入重复键的行-- Insert Into ufdata_001_2005..Rdrecords(id,cinvcode,cbarcode,cfree1,cfree2,cfree3,cfree4,cfree5,cfree6,cfree7,cfree8,cfree9,cfree10,inquantity,innum,cbatch,cassunit,dmadedate,inum,iquantity,iunitcost,iprice,ipunitcost,ipprice,dvdate,cposition,autoid,cvouchcode,isoutquantity,isoutnum,cdefine22,cdefine23,cdefine24,cdefine25,cdefine26,cdefine27,cdefine28,cdefine29,cdefine30,cdefine31,cdefine32,cdefine33,cdefine34,cdefine35,cdefine36,cdefine37,impoids,icheckids,itrids,citemcode,citem_class,cname,citemcname,imassdate,cbvencode,cinvouchcode) Values(234296,'ATS833',NULL,'0','绿色','48',NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,NULL,NULL,NULL,0,1,0,0,NULL,NULL,NULL,'',1601711,NULL,0,0,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,390976,NULL,NULL,NULL,NULL,NULL,NULL,NULL)不能在具有唯一索引aa_rdrocords_pk的对象rdrecords中插入重复键的行;说明还是最大单据号表有问题。 解决方法:1.-- select * from ua_identity where cacc_id = 001 and cVouchtype = 'rd' --iFatherID = 234295 iChildID = 1601709-- select max(id) from ufdata_001_2005..rdrecords --489878-- selexct max(id) from ufdata_001_2005..rdrecord --4898782.备份数据 \\lisheng(192.168.0.99)\d\用友备份\20050301 0944 ufsub ufsystem ufdata_001_2003 ufdata_001_2004 ufdata_001_20053.修改相应字段-- update ua_identity set ifatherid = 489878 where cacc_id = 001 and cVouchtype = 'rd'-- update ua_identity set ichildid = 489878 where cacc_id = 001 and cVouchtype = 'rd'4.验证OK