专业版升级到旗舰版报错
750次浏览
编辑于2017年03月16日 14:44:32
专业版11.0的,先升级到了专业版14.1,后面用升迁工具(20170228更新 的工具)升级到旗舰版的时候报错,报错提示如下:
语句已终止。
不能将值 NULL 插入列 'FEmpID',表 'KISTOAIS20170316113839.dbo.ZPStockBill';列不允许有空值。INSERT 失败。declare @MaxFinterID int
set @MaxFinterID = 0
select @MaxFinterID = max(FinterID) from KIS_ICStockBill
insert into ZPStockBill(
FBrNo,
FInterID,
FTranType,
FROB,
FDate,
FBillNo,
FDCStockID,
FPosterID,
FCheckerID,
FFManagerID,
FSManagerID,
FBillerID,
FDeptID,
FCustID,
FSupplyID,
FStatus,
FUpStockWhenSave,
FCancellation,
FMultiCheckLevel1,
FMultiCheckLevel2,
FMultiCheckLevel3,
FMultiCheckLevel4,
FMultiCheckLevel5,
FMultiCheckLevel6,
FMultiCheckDate1,
FMultiCheckDate2,
FMultiCheckDate3,
FMultiCheckDate4,
FMultiCheckDate5,
FMultiCheckDate6,
FCurCheckLevel,
FCheckDate,
FEmpID,
FExplanation,
FManagerID,
FSelTranType,
FChildren,
FBillTypeID,
FBrID,
FTranStatus)
select distinct t1.FBrNo,
case isnull(t3.FHInterID,'-1') when -1 then t1.FInterID else t1.FInterID+@MaxFinterID end,
260 AS FTranType,
t1.FROB,
t1.FDate,
t1.FBillNo+'XC' AS FBillNo,
t1.FDCStockID,
t1.FPosterID,
t1.FCheckerID,
t1.FFManagerID,
t1.FSManagerID,
t1.FBillerID,
t1.FDeptID,
t1.FCustID,
t1.FSupplyID,
t1.FStatus,
t1.FUpStockWhenSave,
t1.FCancellation,
t1.FMultiCheckLevel1,
t1.FMultiCheckLevel2,
t1.FMultiCheckLevel3,
t1.FMultiCheckLevel4,
t1.FMultiCheckLevel5,
t1.FMultiCheckLevel6,
t1.FMultiCheckDate1,
t1.FMultiCheckDate2,
t1.FMultiCheckDate3,
t1.FMultiCheckDate4,
t1.FMultiCheckDate5,
t1.FMultiCheckDate6,
t1.FCurCheckLevel,
t1.FCheckDate,
t1.FEmpID,
t1.FExplanation,
t1.FManagerID,
t1.FSelTranType,
t1.FChildren,
isnull(t1.FBillTypeID,''),
t1.FBrID,
t1.FTranStatus
from KIS_ICStockBill t1 inner join KIS_ICStockBillEntry t2 on t1.FInterID=t2.FInterID
left join (select FInterID as FHInterID from ICStockBill) t3 on t1.FInterID = t3.FHInterID
where t2.FSCStockID IN (select FItemID from KIS_t_Stock where FTypeID=502) and t2.FDCStockID IN (select FItemID from KIS_t_Stock where FTypeID<>502) and t1.FTranType=41
语句已终止。
不能将值 NULL 插入列 'FEmpID',表 'KISTOAIS20170316113839.dbo.ZPStockBill';列不允许有空值。INSERT 失败。declare @MaxFinterID int
set @MaxFinterID = 0
select @MaxFinterID = max(FinterID) from KIS_ICStockBill
insert into ZPStockBill(
FBrNo,
FInterID,
FTranType,
FROB,
FDate,
FBillNo,
FDCStockID,
FPosterID,
FCheckerID,
FFManagerID,
FSManagerID,
FBillerID,
FDeptID,
FCustID,
FSupplyID,
FStatus,
FUpStockWhenSave,
FCancellation,
FMultiCheckLevel1,
FMultiCheckLevel2,
FMultiCheckLevel3,
FMultiCheckLevel4,
FMultiCheckLevel5,
FMultiCheckLevel6,
FMultiCheckDate1,
FMultiCheckDate2,
FMultiCheckDate3,
FMultiCheckDate4,
FMultiCheckDate5,
FMultiCheckDate6,
FCurCheckLevel,
FCheckDate,
FEmpID,
FExplanation,
FManagerID,
FSelTranType,
FChildren,
FBillTypeID,
FBrID,
FTranStatus)
select distinct t1.FBrNo,
case isnull(t3.FHInterID,'-1') when -1 then t1.FInterID else t1.FInterID+@MaxFinterID end,
260 AS FTranType,
t1.FROB,
t1.FDate,
t1.FBillNo+'XC' AS FBillNo,
t1.FDCStockID,
t1.FPosterID,
t1.FCheckerID,
t1.FFManagerID,
t1.FSManagerID,
t1.FBillerID,
t1.FDeptID,
t1.FCustID,
t1.FSupplyID,
t1.FStatus,
t1.FUpStockWhenSave,
t1.FCancellation,
t1.FMultiCheckLevel1,
t1.FMultiCheckLevel2,
t1.FMultiCheckLevel3,
t1.FMultiCheckLevel4,
t1.FMultiCheckLevel5,
t1.FMultiCheckLevel6,
t1.FMultiCheckDate1,
t1.FMultiCheckDate2,
t1.FMultiCheckDate3,
t1.FMultiCheckDate4,
t1.FMultiCheckDate5,
t1.FMultiCheckDate6,
t1.FCurCheckLevel,
t1.FCheckDate,
t1.FEmpID,
t1.FExplanation,
t1.FManagerID,
t1.FSelTranType,
t1.FChildren,
isnull(t1.FBillTypeID,''),
t1.FBrID,
t1.FTranStatus
from KIS_ICStockBill t1 inner join KIS_ICStockBillEntry t2 on t1.FInterID=t2.FInterID
left join (select FInterID as FHInterID from ICStockBill) t3 on t1.FInterID = t3.FHInterID
where t2.FSCStockID IN (select FItemID from KIS_t_Stock where FTypeID=502) and t2.FDCStockID IN (select FItemID from KIS_t_Stock where FTypeID<>502) and t1.FTranType=41