找回密码
 注册账号

QQ登录

只需一步,快速开始

手机号码,快捷登录

手机号码,快捷登录

初学者课程:T3自学|T6自学|U8自学软件下载课件下载工具下载资料:通资料|U8资料|NC|培训|年结积分规则 | 使用常见问题Q&A
知识库:U8 | | NC | U9 | OA | 政务U8|U9|NCC|NC65|NC65客开|NCC客开新手必读 | 任务 | 快速增金币用友QQ群[微信群]
查看: 5006|回复: 8

在做成本卷积检查与成本检查时报错:不能在具有唯一索引'idx_JS'的对象'CA_AmoCt'中插 ...

  [复制链接]
发表于 2009-2-5 06:31:17 | 显示全部楼层 |阅读模式
U8知识库
问题号: 15683
解决状态: 临时解决方案
软件版本: 8.70
软件模块: 其他
行业: 通用
关键字: 成本卷积检查idx_JS'的对象'CA_AmoCt'
适用产品: 870
问题名称: 在做成本卷积检查与成本检查时报错:不能在具有唯一索引'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)
解决方案: 通过语句进行分析查找
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)
补丁编号:
录入日期: 2008-4-15
最后更新时间:

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册账号

×
在做成本卷积检查与成本检查时报错:不能在具有唯一索引'idx_JS'的对象'CA_AmoCt'中插入重复键的行,成本计算检查被迫终止
发表于 2009-9-17 14:10:29 | 显示全部楼层
太复杂了,看不懂
发表于 2009-9-24 20:47:00 | 显示全部楼层
太复杂了,看不懂
发表于 2010-5-7 14:05:41 | 显示全部楼层
太复杂了,看不懂
发表于 2010-7-11 00:27:08 | 显示全部楼层
这么复杂,:dizzy:
发表于 2011-3-21 08:40:07 | 显示全部楼层
好资料,顶一下。。。。
发表于 2011-3-23 18:36:36 | 显示全部楼层
看不懂!
发表于 2011-3-23 21:53:43 | 显示全部楼层
不是很清楚
发表于 2011-3-24 00:29:03 | 显示全部楼层
应该是比较好的方法,暂时我还没有遇到过这样的问题,学习下。
您需要登录后才可以回帖 登录 | 注册账号

本版积分规则

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

GMT+8, 2024-5-22 02:14 , Processed in 0.026817 second(s), 12 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表