WenYY 发表于 2014-5-12 17:51:45

急急急急!U8升级报错 插入错误列名或提供值的数目与表定义不匹配

数据库名: UFDATA_001_2012
D:\U8SOFT\Admin\SQLFILE8720\Main\Ufdata\data\NL\data_data_wa_mix_nl.sql
错误信息:
-2147217900
插入错误: 列名或所提供值的数目与表定义不匹配。
执行如下语句时出错:
delete from aa_columnset_base where ckey in('hr_hi_pay','hr_hi_paychange','hr_hi_edu','hr_hi_jobinfo','hr_hi_person')
delete from aa_columndic_base where ckey in('hr_hi_pay','hr_hi_paychange','hr_hi_edu','hr_hi_jobinfo','hr_hi_person')
delete AA_ColumnDicCache_Detail where ckey in('hr_hi_pay','hr_hi_paychange','hr_hi_edu','hr_hi_jobinfo','hr_hi_person')
delete AA_ColumnDicCache_main where ckey in('hr_hi_pay','hr_hi_paychange','hr_hi_edu','hr_hi_jobinfo','hr_hi_person')

update WA_TaxSysItem set citemdata = 'wa_sds_ex.ycurtax' where id = 12
update WA_TaxSysItem set citemdata = 'isnull(WA_SDS_EX.YCurTax,0)' where id = 13
update WA_TaxFormat set cdatasource = 'wa_sds_ex.ycurtax' where cdatasource = 'WA_SDS_EX.YTax'
update WA_TaxFormat set cdatasource = 'isnull(WA_SDS_EX.YCurTax,0)' where cdatasource = 'isnull(WA_SDS_EX.YTax,0)'

update WA_TaxFormat set cdatasource = 'case when (WA_SDS_EX.ycurincome - case when (WA_SDS_EX.youtlay - wa_sds_ex.yincom_sumpre)>=0 then (WA_SDS_EX.youtlay - wa_sds_ex.yincom_sumpre) else 0 end) > = 0 then (WA_SDS_EX.ycurincome - case when (WA_SDS_EX.youtlay - wa_sds_ex.yincom_sumpre)>=0 then (WA_SDS_EX.youtlay - wa_sds_ex.yincom_sumpre) else 0 end) else 0 end' where cdatasource = 'case when (WA_SDS_EX.yIncom_Sum - WA_SDS_EX.youtlay) > = 0 then (WA_SDS_EX.yIncom_Sum - WA_SDS_EX.youtlay) else 0 end'
update WA_TaxSysItem set citemdata = 'case when (WA_SDS_EX.ycurincome - case when (WA_SDS_EX.youtlay - wa_sds_ex.yincom_sumpre)>=0 then (WA_SDS_EX.youtlay - wa_sds_ex.yincom_sumpre) else 0 end) > = 0 then (WA_SDS_EX.ycurincome - case when (WA_SDS_EX.youtlay - wa_sds_ex.yincom_sumpre)>=0 then (WA_SDS_EX.youtlay - wa_sds_ex.yincom_sumpre) else 0 end) else 0 end' where citemdata = 'case when (WA_SDS_EX.yIncom_Sum - WA_SDS_EX.youtlay) > = 0 then (WA_SDS_EX.yIncom_Sum - WA_SDS_EX.youtlay) else 0 end'

delete from hr_sys_itemdict_base where ctablecode = 'WA_GZDATA' and citemcode = 'iCheckFlag'
insert into hr_sys_itemdict_base (,,,,,,,,,,,,,,,,,,)
SELECT 'WA_GZDATA','iCheckFlag','审核标志','','6','','0','6','','1','0','0','','0','99','0','1','',LocaleID from U8LangDefine
delete from hr_sys_itemdict_base where ctablecode = 'WA_GZDATA' and citemcode = 'dCheckDate'
insert into hr_sys_itemdict_base (,,,,,,,,,,,,,,,,,,)
SELECT 'WA_GZDATA','dCheckDate','审核时间','','14','','0','10','','1','0','0','','0','100','0','1','',LocaleID from U8LangDefine
delete from hr_sys_itemdict_base where ctablecode = 'WA_GZDATA' and citemcode = 'cCheckPerson'
insert into hr_sys_itemdict_base (,,,,,,,,,,,,,,,,,,)
SELECT 'WA_GZDATA','cCheckPerson','审核人','','2','','0','100','','1','0','0','','0','101','0','1','',LocaleID from U8LangDefine
delete from hr_sys_itemdict_base where ctablecode = 'WA_GZDATA' and citemcode = 'iCashFlag'
insert into hr_sys_itemdict_base (,,,,,,,,,,,,,,,,,,)
SELECT 'WA_GZDATA','iCashFlag','现金发放标志','','6','','0','9','','1','0','0','','0','102','0','1','',LocaleID from U8LangDefine
declare @GzGradeNum as varchar(100)
declare @Order as integer
DECLARE ItemCursorCursor For select distinct cGZGradeNumfrom wa_gzitem where cGZGradeNum not in (select distinct cGZGradeNum from wa_gzitem where igzitem_id >=1006)
OPEN ItemCursor
FETCH NEXT FROM ItemCursor INTO @GzGradeNum
WHILE @@FETCH_STATUS =0
BEGIN

select @Order = max(iOrder) + 1 from wa_GzItem where cGzGradeNum = @GzGradeNum

insert into wa_GzItem values (@GzGradeNum,1006,@Order,NULL)

FETCH NEXT FROM ItemCursor INTO @GzGradeNum
END
CLOSE ItemCursor
DEALLOCATEItemCursor

WenYY 发表于 2014-5-12 17:54:27

这是一个帐套里面的一年,从2009年到2014年。别的年度升级都没有报这个错误,只有2012年度升级的时候报这个错误。会
我曾经执行过一个SLQ修复语句,但是别的年度没有任何影响不应该只有这个年度有影响吧!!!



大侠们快给看看怎么解决!!!

zhang3530053 发表于 2014-5-13 08:26:30

要看看升级日志。
页: [1]
查看完整版本: 急急急急!U8升级报错 插入错误列名或提供值的数目与表定义不匹配