|
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'中插入重复键的行,成本计算检查被迫终止 |
|