环境:windows server 2008 sql server 2008
执行文件E:\KINGDEE\K3ERP\KDSYSTEM\KDCOM\SqlSrv\[04]SP_KSEV14.2MFGTemplate_Bill.sql出错。
错误描述:违反了 PRIMARY KEY 约束 'pk_ICTableRelation'。不能在对象 'dbo.ICTableRelation' 中插入重复键。
错误语句:
--TEAM=,DBA=,PM=,DC=,TEL=
declare @FInterID int
Select @FInterID = max(FInterID)+1 From ICTableRelation
Where FTypeID = 0 and FBillID = 'B04' and FFieldID = 'FSCBillInterID'
INSERT INTO ICTableRelation (FTypeID, FInterID, FTableName, FTableNameAlias, FFieldName, FTableName11, FTableNameAlias11, FFieldName11, FLogic, FBillID, FFieldID, FMode, FIndex, FCondition, FLeftParentheses, FRightParentheses, FLogicOperator, FISConst, FConstType, FSubFilter)
VALUES (0,@FInterID,'PPBomEntry','u3','FAuxPropID','ICInventory','t444','FAuxPropID','=','B04','1002519',0,0,' AND ','','','=',0,0,'')
INSERT INTO ICTableRelation (FTypeID, FInterID, FTableName, FTableNameAlias, FFieldName, FTableName11, FTableNameAlias11, FFieldName11, FLogic, FBillID, FFieldID, FMode, FIndex, FCondition, FLeftParentheses, FRightParentheses, FLogicOperator, FISConst, FConstType, FSubFilter)
VALUES (0,@FInterID+1,'PPBomEntry','u3','FAuxPropID','POInventory','t555','FAuxPropID','=','B04','1002519',0,0,' AND ','','','=',0,0,'')
推荐阅读