在做成本卷积检查与成本检查时报错:不能在具有唯一索引'idx_JS'的对象'CA_AmoCt'中插入重复键的行,成本计算检查被迫终止 问题描述:在做成本卷积检查与成本检查时报错:不能在具有唯一索引'idx_JS'的对象'CA_AmoCt'中插入重复键的行,成本计算检查被迫终止 问题原因:select distinct a1.* from CA_Quo a1 inner join CaQ_coplan b1 on a1.cppid=b1.iPlanCOID inner join (select * from ca_batchmap_cur where ibomtype <> 3) c1 on (b1.cDeptID=c1.cDeptID and b1.iPartID=c1.iPartID and b1.version=c1.version and b1.IdentCode=c1.IdentCode) inner join Ca_EquiOutput d1 on d1.iRealCOID=c1.iRealCOID and d1.cbatch = c1.cbatch where c1.cDeptID='10' and (c1.cbatch = '' or '' = '') and a1.camotype='1' and dbo.CaF_RefFromBom(1,'',c1.iPartID,1) = 1 and isnull(a1.iQuo*d1.fBurCostQua,0)<>0 and d1.cAmotype like '%' + '1' + '%' and d1.cDetailCode= dbo.CaF_GetDetailCode(0,1,1,'',12) and c1.irealcoid in (71855,72825) order by 1,2 select * from caq_coplan where iplancoid in ( select distinct a1.cppid from CA_Quo a1 inner join CaQ_coplan b1 on a1.cppid=b1.iPlanCOID inner join (select * from ca_batchmap_cur where ibomtype <> 3) c1 on (b1.cDeptID=c1.cDeptID and b1.iPartID=c1.iPartID and b1.version=c1.version and b1.IdentCode=c1.IdentCode) inner join Ca_EquiOutput d1 on d1.iRealCOID=c1.iRealCOID and d1.cbatch = c1.cbatch where c1.cDeptID='10' and (c1.cbatch = '' or '' = '') and a1.camotype='1' and dbo.CaF_RefFromBom(1,'',c1.iPartID,1) = 1 and isnull(a1.iQuo*d1.fBurCostQua,0)<>0 and d1.cAmotype like '%' + '1' + '%' and d1.cDetailCode= dbo.CaF_GetDetailCode(0,1,1,'',12) and c1.irealcoid in (71855,72825) ) delete from ca_coplan where iplancoid in (33623,58672) 解决方案:游客无权查看 相关补丁:模块:其他产品:870问题名称:在做成本卷积检查与成本检查时报错:不能在具有唯一索引'idx_JS'的对象'CA_AmoCt'中插入重复键的行,成本计算检查被迫终止更新时间:2008-04-15 00:00:00 有用 没用83 浏览 分类 U8知识库用友U8知识库(旧)畅捷通知识库用友NC知识库用友U9知识库用友政务知识库致远OA知识库U8Cloud知识库