各位老师:
在配置单据转换时(采购申请单---委外订单),配置完成后发下数量物料等都能够带下来,但是审核的时候报错,以下是报错的内容:
MERGE 语句试图多次更新或删除同一行。目标行与多个源行匹配时会出现这种情况。MERGE 语句无法多次更新/删除目标表的同一行。请简化 ON 子句,以确保目标行最多与一个源行匹配,也可以使用 GROUP BY 子句对源行分组。
发生时间: 2017-04-23 11:02:36
错误编号: BOS_ExecuteNonQuery
错误信息: MERGE 语句试图多次更新或删除同一行。目标行与多个源行匹配时会出现这种情况。MERGE 语句无法多次更新/删除目标表的同一行。请简化 ON 子句,以确保目标行最多与一个源行匹配,也可以使用 GROUP BY 子句对源行分组。
Sql语句: MERGE INTO T_SUB_REQORDERENTRY U1 USING(SELECT 2 fnewstatus, T1.FENTRYID FROM T_SUB_REQORDERENTRY T1 WHERE T1.FENTRYID IN (100051) UNION ALL SELECT 2 fnewstatus, T2.FENTRYID FROM T_SUB_REQORDERENTRY T1 INNER JOIN T_SUB_REQORDERENTRY T2 ON T1.FROWID = T2.FPARENTROWID WHERE T1.FENTRYID IN (100051)) U2 ON (U1.FENTRYID = U2.FENTRYID) WHEN MATCHED THEN UPDATE SET U1.FStatus = U2.FNEWSTATUS;
===================================================
调用堆栈:
Server stack trace:
at Kingdee.BOS.App.Data.AbstractDatabase.ExecuteNonQuery(DbCommand command, IEnumerable`1 listParam)
at Kingdee.BOS.App.Data.DBUtils.Execute(Context ctx, String strSQL, IEnumerable`1 paramList, Boolean needTranslate)
at Kingdee.BOS.App.Data.DBUtils.Execute(Context ctx, String strSQL, IEnumerable`1 paramList)
at Kingdee.K3.MFG.SUB.App.Core.SubReqOrderService.SetOperationLogInfo(Context ctx, List`1 roeIds, String fieldName, Object objValue)
at Kingdee.K3.MFG.SUB.App.Core.SUBBizState.Confirm.SetOperationLogInfo(Boolean bIsConfirm)
at Kingdee.K3.MFG.SUB.App.Core.SUBBizState.Confirm.Do()
at Kingdee.K3.MFG.App.BizEngine.BizStateEngine.ExecuteBusinessStateLogic(Boolean bExecuteForward)
at Kingdee.K3.MFG.App.BizEngine.BizStateEngine.InternalRun()
at Kingdee.K3.MFG.SUB.App.Core.SubReqOrderService.SUBStateTransfer(Context ctx, IEnumerable`1 subEntryDataEntities, String operation, OperateOption option)
at Kingdee.K3.MFG.SUB.App.ServicePlugIn.ReqOrder.Audit.<>c__DisplayClass8.
at Kingdee.K3.MFG.SUB.App.ServicePlugIn.Util.SubReqStateUtil.GetSubReqOrderEntryDataEntity(Context ctx, IEnumerable`1 pkIds, Action`1 callback)
at Kingdee.BOS.App.Core.PlugInProxy.OperationServicePlugInProxy.FireBeginOperationTransaction(BeginOperationTransactionArgs e)
at Kingdee.BOS.App.Core.AbstractOprerationService.CallOperation(DynamicObject[]& objs)
at Kingdee.BOS.App.Core.AbstractOprerationService.CallOperatinTransaction(DynamicObject[] objs)
at Kingdee.BOS.App.Core.AbstractOprerationService.DoExcete()
at Kingdee.BOS.App.Core.AbstractOprerationService.Excute(Object[] ids)
at Kingdee.BOS.App.Core.AbstractSetStatus.Excute(Object[] ids)
at Kingdee.BOS.App.Core.SetStatusService.SetBillStatus(Context ctx, BusinessInfo businessInfo, List`1 pkEntryIds, List`1 paras, String operationNumber, OperateOption option)
Exception rethrown at [0]:
at Kingdee.BOS.ServiceHelper.BusinessDataServiceHelper.SetBillStatus(Context ctx, BusinessInfo businessInfo, List`1 pkEntryIds, List`1 paras, String operationNumber, OperateOption option)
at Kingdee.BOS.Business.Bill.Operation.AbstractStatusConvert.ExecuteBillOperation(List`1 paras, OperateOption option)
at Kingdee.BOS.Business.Bill.Operation.AbstractStatusConvert.ExecuteStatusConvert(List`1 paras)
at Kingdee.BOS.Business.Bill.Operation.Audit.AuditIdeaPrompt()
at Kingdee.BOS.Core.DynamicForm.AbstractDynamicFormOperation.Operation(CallBackWfAfterOperation callbackwf, IOperationResult result)
以下是配置的单据转换内容
1、字段映射
2、配置的数量转换服务
3、配置的关联主体
请问老师这个报错大概是什么意思呢?
推荐阅读