金蝶K/3 WISE15.1迁移 金蝶KIS旗舰版7.01 迁移失败提示列名 ‘FStockIDInst’ 无效。列名 ‘FStockIDAssign’ 无效。列名 ‘FBankNumber’ 无效。–迁移客户资料(自定义字段)
[全站通告] 想快速节省您的时间并可接受付费的朋友,可扫右边二维码加博主微信-非诚勿扰!
基础数据迁移 列名 ‘FStockIDInst’ 无效。
列名 ‘FStockIDAssign’ 无效。
列名 ‘FBankNumber’ 无效。–迁移客户资料(自定义字段)
declare @colName varchar(80)–详细报错日志在最文章下面
数据库跟踪过后找到问题表进行修复处理
解决方案:
1、先备份好账套文件
2、下载修复语句,到数据库中对K3账套执行,再迁移
修复语句知识付费:
经过上面执行修复好,该报错就不提示了
具体报错日志:
基础数据迁移 列名 ‘FStockIDInst’ 无效。
列名 ‘FStockIDAssign’ 无效。
列名 ‘FBankNumber’ 无效。–迁移客户资料(自定义字段)
declare @colName varchar(80)
列名 ‘FStockIDInst’ 无效。
列名 ‘FStockIDAssign’ 无效。
列名 ‘FBankNumber’ 无效。–迁移客户资料(自定义字段)
declare @colName varchar(80)
declare @dataType varchar(80)
declare @dataLength int
declare @ExecSQL varchar(8000)
declare @colsVale varchar(2000)
set @ExecSQL = ”
set @colName = ”
set @colsVale = ”
declare @Item_col_cursor cursor
Set @Item_col_cursor = cursor for
select column_name,data_type,isnull(CHARACTER_MAXIMUM_LENGTH,0) from information_schema.columns
where table_name = ‘K3_t_Organization’ and COLUMN_NAME like ‘F\_%’ escape ‘\’
open @Item_col_cursor
fetch @Item_col_cursor into @colName,@dataType,@dataLength
while @@fetch_status=0
Begin
if @dataType = ‘varchar’ or @dataType = ‘nvarchar’
begin
set @ExecSQL =@ExecSQL + ‘ Alter Table t_Organization Add ‘ + @colName + ‘ ‘ + @dataType + ‘(‘ + convert(varchar(10),@dataLength) + ‘) null’
set @colsVale = @colsVale + ‘,’ + @colName
end
else if @dataType = ‘decimal’
begin
set @ExecSQL =@ExecSQL + ‘ Alter Table t_Organization Add ‘ + @colName + ‘ decimal(23,10) null’
set @colsVale = @colsVale + ‘,’ + @colName
end
else
begin
set @ExecSQL =@ExecSQL + ‘ Alter Table t_Organization Add ‘ + @colName + ‘ ‘ + @dataType + ‘ null’
set @colsVale = @colsVale + ‘,’ + @colName
end
fetch next from @Item_col_cursor into @colName,@dataType,@dataLength
End
IF @ExecSQL<>” exec (@ExecSQL)
close @Item_col_cursor
deallocate @Item_col_cursor
set @ExecSQL = ”
set @ExecSQL = ‘
Insert into t_Organization(
FItemID,
FAddress,
FCity,
FProvince,
FCountry,
FPostalCode,
FPhone,
FFax,
FEmail,
FHomePage,
FCreditLimit,
FTaxID,
FBank,
FAccount,
FBankNumber,
FBrNo,
FBoundAttr,
FErpClsID,
FShortName,
FPriorityID,
FPOGroupID,
FStatus,
FLanguageID,
FRegionID,
FTrade,
FMinPOValue,
FMaxDebitDate,
FLegalPerson,
FContact,
FContactAcct,
FPhoneAcct,
FFaxAcct,
FZipAcct,
FEmailAcct,
FAddrAcct,
FTax,
FCyID,
FSetID,
FSetDLineID,
FTaxNum,
FPriceClsID,
FOperID,
FCIQNumber,
FDeleted,
FSaleMode,
FName,
FNumber,
FParentID,
FShortNumber,
FARAccountID,
FAPAccountID,
FpreAcctID,
FlastTradeAmount,
FlastRPAmount,
FfavorPolicy,
Fdepartment,
Femployee,
Fcorperate,
FbeginTradeDate,
FendTradeDate,
FlastTradeDate,
FlastReceiveDate,
FcashDiscount,
FcurrencyID,
FmaxDealAmount,
FminForeReceiveRate,
FminReserverate,
FdebtLevel,
FCarryingAOS,
FIsCreditMgr,
FCreditPeriod,
FCreditLevel,
FPayTaxAcctID,
FValueAddRate,
FTypeID,
FCreditDays,
FCreditAmount,
FStockIDAssign,
FStockIDInst,
FStockIDKeep,
FPaperPeriod,
FAlarmPeriod,
FLicAndPermit,
FOtherARAcctID,
FOtherAPAcctID,
FPreAPAcctID,
FSaleID,
FHelpCode,
–FModifyTime,
FNameEN,
FAddrEn,
FCIQCode,
FRegion,
FMobilePhone,
FPayCondition,
FManageType,
FClass,
FValue,
FRegUserID,
FLastModifyDate,
FRecentContactDate,
FRegDate,
FFlat,
FClassTypeID,
FCoSupplierID,
FShareStatus’ + @colsVale + ‘
)
select
FItemID,
FAddress,
FCityID,
FProvinceID,
FCountry,
FPostalCode,
FPhone,
FFax,
FEmail,
FHomePage,
FCreditLimit,
FTaxID,
FBank,
FAccount,
FBankNumber,
FBrNo,
FBoundAttr,
FErpClsID,
FShortName,
FPriorityID,
FPOGroupID,
FStatus,
FLanguageID,
FRegionID,
FTrade,
FMinPOValue,
FMaxDebitDate,
FLegalPerson,
FContact,
FContactAcct,
FPhoneAcct,
FFaxAcct,
FZipAcct,
FEmailAcct,
FAddrAcct,
FTax,
FCyID,
FSetID,
FSetDLineID,
FTaxNum,
FPriceClsID,
FOperID,
FCIQNumber,
FDeleted,
FSaleMode,
FName,
FNumber,
FParentID,
FShortNumber,
FARAccountID,
FAPAccountID,
FpreAcctID,
FlastTradeAmount,
FlastRPAmount,
FfavorPolicy,
Fdepartment,
Femployee,
Fcorperate,
FbeginTradeDate,
FendTradeDate,
FlastTradeDate,
FlastReceiveDate,
FcashDiscount,
FcurrencyID,
FmaxDealAmount,
FminForeReceiveRate,
FminReserverate,
FdebtLevel,
FCarryingAOS,
FIsCreditMgr,
FCreditPeriod,
FCreditLevel,
FPayTaxAcctID,
FValueAddRate,
FTypeID,
FCreditDays,
FCreditAmount,
FStockIDAssign,
FStockIDInst,
FStockIDKeep,
FPaperPeriod,
FAlarmPeriod,
FLicAndPermit,
FOtherARAcctID,
FOtherAPAcctID,
FPreAPAcctID,
FSaleID,
FHelpCode,
–FModifyTime,
FNameEN,
FAddrEn,
FCIQCode,
FRegion,
FMobilePhone,
FPayCondition,
FManageType,
FClass,
FValue,
FRegUserID,
FLastModifyDate,
FRecentContactDate,
FRegDate,
FFlat,
FClassTypeID,
FCoSupplierID,
FShareStatus’ + @colsVale + ‘
From K3_t_Organization’
exec (@ExecSQL)