MRP计算提示错误
金蝶云社区-zdg
zdg
0人赞赏了该文章 860次浏览 未经作者许可,禁止转载编辑于2015年10月25日 01:40:41
当MRP计划方案的合并参数未勾选时,在MRP计算过程中提示错误,具体错误信息:source:MERGE INTO T_PLN_PLANORDER LTUSING(SELECT DISTINCT TA.FMATERIALID, TBOM.FSRQLINES, TBOM.FSRQLONG,TBOM.FSRQWIDTH FROM (SELECT T1.FID, T1.FMATERIALID, T2.FSALEORDERENTRYID FROMT_PLN_PLANORDER T1 INNER JOIN T_PLN_PLANORDER_B T2 ON T1.FID = T2.FID WHERE((FRELEASETYPE = '3' AND FCOMPUTEID = 'c4346bb9d66f81e011e57a707fe516c4') AND(T2.FSALEORDERENTRYID <> 0))) ta INNER JOIN (SELECT DISTINCT T1.FID,T1.FMATERIALID, T2.FSALEORDERENTRYID, T1.FBOMID FROM T_PLN_PLANORDER T1 INNERJOIN T_PLN_PLANORDER_B T2 ON T1.FID = T2.FID WHERE ((FCOMPUTEID ='c4346bb9d66f81e011e57a707fe516c4' AND (T2.FSALEORDERENTRYID <> 0)) AND(T1.FBOMID <> 0))) tb ON TA.FSALEORDERENTRYID = TB.FSALEORDERENTRYIDINNER JOIN T_ENG_BOMCHILD TBOM ON (TB.FBOMID = TBOM.FID AND TA.FMATERIALID =TBOM.FMATERIALID)) TT ON (((LT.FRELEASETYPE = '3' AND LT.FMATERIALID =TT.FMATERIALID) AND LT.FCOMPUTEID = 'c4346bb9d66f81e011e57a707fe516c4')) WHENMATCHED THEN UPDATE SET LT.FSRQLONG = TT.FSRQLONG, LT.FSRQWIDTH = TT.FSRQWIDTH,LT.FSRQLINES = TT.FSRQLINES;message:MERGE 语句试图多次更新或删除同一行。目标行与多个源行匹配时会出现这种情况。MERGE 语句无法多次更新/删除目标表的同一行。请简化 ON 子句,以确保目标行最多与一个源行匹配,也可以使用 GROUP BY 子句对源行分组。stacktrace: at Kingdee.BOS.App.Data.AbstractDatabase.ExecuteNonQuery(DbCommandcommand, IEnumerable`1 listParam) atKingdee.BOS.App.Data.DBUtils.Execute(Context ctx, String strSQL, IEnumerable`1paramList, Boolean needTranslate) atSRQ.K3.Bill.Business.App.MRP.SRQCompleteMRPLogicUnit.UpdatePlanOrderInfo() atKingdee.K3.MFG.PLN.App.MrpModel.LogicUnitImpl.Mrp.CompleteMrpLogicUnit.OnExecuteLogicUnit() atKingdee.K3.MFG.PLN.App.MrpModel.AbstractMrpLogicUnit.Execute() atKingdee.K3.MFG.PLN.App.Core.MrpComputeService.RunMrp(Context ctx, DynamicObjectmrpDataObject, OperateOption option)