马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册账号
×
数据库名: UFDATA_001_2010
D:\U8SOFT\Admin\SQLFILE8900\Main\Ufdata\Structure\data_prv_ed_mix_nl.sql
错误信息:
-2147217900
列名 'cOMCostDifCode' 无效。
执行如下语句时出错: CREATE FUNCTION dbo.GetInvCode(@invCCode nvarchar(12),@cType char(1),@Itemvarchar(50),@cInvType nvarchar(2))RETURNS nvarchar(12)ASBEGIN ifisnull(@invCCode,'')='' RETURN('') declare @cInvCode as nvarchar(20) declare @cInvCCodeP as nvarchar(12) declare @CodeLen as tinyint declare @CodeLenP as tinyint --前级编码长度 declare@CodeLenC as tinyint --当前编码长度 declare @i as integer declare @j as integer select @i=len(CodingRule) from GradeDef where iSerial=3 set @j=1 set @CodeLen=0 set @CodeLenP=0 set @CodeLenC=len(@invCCode) while @j<=@i begin set @CodeLenP=@CodeLen select @CodeLen=@CodeLen+convert(tinyint,substring(CodingRule,@j,1))from GradeDef where iSerial=3 if @CodeLen=@CodeLenC break set @j=@j+1 end select @cInvCode=case when @Item='cInvCode' then cInvCode when@Item='cInvPrcDifCode' then cInvPrcDifCode when@Item='cInvQanDifCode' then cInvQanDifCode when@Item='cInvVerDifCode' then cInvVerDifCode when @Item='cLbrCode'then cLbrCode when@Item='cLbrPrcDifCode' then cLbrPrcDifCode when@Item='cLbrQanDifCode' then cLbrQanDifCode when@Item='cLbrVerDifCode' then cLbrVerDifCode when@Item='fSemiLaborDif' then fSemiLaborDif when@Item='cManFixCode' then cManFixCode when@Item='cManFixPrcDifCode' then cManFixPrcDifCode when @Item='cManFixQanDifCode'then cManFixQanDifCode when@Item='cManFixVerDifCode' then cManFixVerDifCode when @Item='fSemiManuFixDif' thenfSemiManuFixDif when@Item='cManVarCode' then cManVarCode when@Item='cManVarPrcDifCode' then cManVarPrcDifCode when@Item='cManVarQanDifCode' then cManVarQanDifCode
when@Item='cManVarVerDifCode' then cManVarVerDifCode when @Item='fSemiManuVarDif' thenfSemiManuVarDif when@Item='cOMCostCode' then cOMCostCode when@Item='cOMCostVerDifCode' then cOMCostVerDifCode when@Item='cOMCostDifCode' then cOMCostDifCode when @Item='fSemiOmCostDif' thenfSemiOmCostDif end
from pl_CO_InvCCode where cInvCCode=@InvCCode and cType=@cType andisnull(cInvType,'0')=@cInvType ifnot @cInvCode is null RETURN(@cInvCode) else begin declare @L as nvarchar(12) select @cInvCCodeP=cInvCCode from inventoryclass wherecInvCCode=substring(@invCCode,1,@CodeLenP) if @CodeLenP<>0 begin set @L=dbo.GetInvCode(@cInvCCodeP,@cType,@Item,@cInvType) RETURN(@L) end else RETURN(NULL) end RETURN(NULL)END
效率测试报告:开始升级UFDATA_808_2018数据库
Data_STR_PB_DR_NL.SQL,2019-12-2617:45:27 -- 2019-12-26 17:45:28,0小时0分钟1秒。Data_STR_PB_mix_NL.SQL,2019-12-2617:45:28 -- 2019-12-26 17:45:31,0小时0分钟3秒。Data_STR_PB_Vou_NL.SQL,2019-12-2617:45:31 -- 2019-12-26 17:45:31,0小时0分钟0秒。DATA_STR_WF_MIX_NL.SQL,2019-12-2617:45:31 -- 2019-12-26 17:45:31,0小时0分钟0秒。DATA_STR_PB_EAI_NL.SQL,2019-12-2617:45:31 -- 2019-12-26 17:45:32,0小时0分钟1秒。data_str_pb_uap_nl.SQL,2019-12-2617:45:32 -- 2019-12-26 17:45:32,0小时0分钟0秒。data_str_pb_as_nl.SQL,2019-12-2617:45:32 -- 2019-12-26 17:45:33,0小时0分钟1秒。data_str_pb_flow_nl.SQL,2019-12-2617:45:33 -- 2019-12-26 17:45:34,0小时0分钟1秒。Data_STR_SR_mix_NL.SQL,2019-12-2617:45:34 -- 2019-12-26 17:45:34,0小时0分钟0秒。data_str_ss_mix_nl.SQL,2019-12-2617:45:34 -- 2019-12-26 17:45:34,0小时0分钟0秒。data_str_wa_mix_nl.SQL,2019-12-2617:45:34 -- 2019-12-26 17:45:34,0小时0分钟0秒。Data_STR_HR_TM_mix_NL.SQL,2019-12-2617:45:34 -- 2019-12-26 17:45:37,0小时0分钟3秒。data_str_ht_mix_nl.SQL,2019-12-2617:45:37 -- 2019-12-26 17:45:37,0小时0分钟0秒。data_str_pr_mix_nl.SQL,2019-12-2617:45:37 -- 2019-12-26 17:45:37,0小时0分钟0秒。data_str_hb_mix_nl.SQL,2019-12-2617:45:37 -- 2019-12-26 17:45:38,0小时0分钟1秒。data_str_hm_mix_nl.SQL,2019-12-2617:45:38 -- 2019-12-26 17:45:38,0小时0分钟0秒。data_str_wm_mix_nl.SQL,2019-12-2617:45:38 -- 2019-12-26 17:45:39,0小时0分钟1秒。DATA_STR_FA_MIX_NL.SQL,2019-12-2617:45:39 -- 2019-12-26 17:45:41,0小时0分钟2秒。DATA_STR_CR_MIX_NL.SQL,2019-12-2617:45:41 -- 2019-12-26 17:45:42,0小时0分钟1秒。Data_STR_CM_mix_NL.SQL,2019-12-2617:45:42 -- 2019-12-26 17:45:43,0小时0分钟1秒。data_str_cm_log_nl.SQL,2019-12-2617:45:43 -- 2019-12-26 17:45:43,0小时0分钟0秒。data_str_ed_mix_nl.SQL,2019-12-2617:45:43 -- 2019-12-26 17:45:47,0小时0分钟4秒。Data_STR_NE_mix_NL.SQL,2019-12-2617:45:47 -- 2019-12-26 17:45:47,0小时0分钟0秒。Data_STR_NB_Mix_NL.SQL,2019-12-2617:45:47 -- 2019-12-26 17:45:47,0小时0分钟0秒。DATA_STR_BG_MIX_NL.SQL,2019-12-2617:45:47 -- 2019-12-26 17:45:52,0小时0分钟5秒。Data_STR_GL_mix_NL.SQL,2019-12-2617:45:52 -- 2019-12-26 17:45:52,0小时0分钟0秒。Data_STR_CA_mix_NL.SQL,2019-12-2617:45:52 -- 2019-12-26 17:45:54,0小时0分钟2秒。Data_STR_AP_mix_NL.SQL,2019-12-2617:45:54 -- 2019-12-26 17:45:54,0小时0分钟0秒。data_str_ap_log_nl.SQL,2019-12-2617:45:54 -- 2019-12-26 17:45:54,0小时0分钟0秒。data_str_sc_mix_nl.SQL,2019-12-2617:45:54 -- 2019-12-26 17:45:54,0小时0分钟0秒。Data_STR_EX_mix_NL.SQL,2019-12-2617:45:54 -- 2019-12-26 17:45:55,0小时0分钟1秒。Data_STR_IM_mix_NL.SQL,2019-12-2617:45:55 -- 2019-12-26 17:45:55,0小时0分钟0秒。data_str_sa_mix_nl.SQL,2019-12-2617:45:55 -- 2019-12-26 17:45:58,0小时0分钟3秒。Data_STR_ST_mix_NL.SQL,2019-12-2617:45:58 -- 2019-12-26 17:45:58,0小时0分钟0秒。Data_STR_PU_mix_NL.SQL,2019-12-2617:45:58 -- 2019-12-26 17:45:59,0小时0分钟1秒。data_str_scm_mix_nl.SQL,2019-12-26 17:45:59-- 2019-12-26 17:45:59,0小时0分钟0秒。 Data_STR_QM_mix_NL.SQL,2019-12-2617:45:59 -- 2019-12-26 17:46:00,0小时0分钟1秒。Data_STR_IA_mix_NL.SQL,2019-12-2617:46:00 -- 2019-12-26 17:46:00,0小时0分钟0秒。Data_STR_OM_mix_NL.SQL,2019-12-2617:46:00 -- 2019-12-26 17:46:00,0小时0分钟0秒。DATA_STR_GSP_MIX_NL.SQL,2019-12-2617:46:00 -- 2019-12-26 17:46:00,0小时0分钟0秒。data_str_hy_mix_nl.SQL,2019-12-2617:46:00 -- 2019-12-26 17:46:01,0小时0分钟1秒。data_str_qt_mix_nl.SQL,2019-12-2617:46:01 -- 2019-12-26 17:46:02,0小时0分钟1秒。Data_STR_FC_mix_NL.SQL,2019-12-2617:46:02 -- 2019-12-26 17:46:04,0小时0分钟2秒。data_str_pffc_u890_nl.SQL,2019-12-2617:46:04 -- 2019-12-26 17:46:04,0小时0分钟0秒。DATA_PRV_PB_MIX_NL.SQL,2019-12-2617:46:04 -- 2019-12-26 17:46:04,0小时0分钟0秒。Data_PRV_CA_mix_NL.SQL,2019-12-2617:46:04 -- 2019-12-26 17:46:05,0小时0分钟1秒。Data_PRV_SR_mix_NL.SQL,2019-12-2617:46:05 -- 2019-12-26 17:46:06,0小时0分钟1秒。Data_PRV_CM_mix_NL.SQL,2019-12-2617:46:06 -- 2019-12-26 17:46:15,0小时0分钟9秒。data_prv_cm_rel_nl.SQL,2019-12-2617:46:15 -- 2019-12-26 17:46:15,0小时0分钟0秒。data_prv_cm_log_nl.SQL,2019-12-2617:46:15 -- 2019-12-26 17:46:15,0小时0分钟0秒。 升级起始时间:2019-12-26 17:45:18,结束时间:2019-12-26 17:46:21,0小时1分钟3秒。
|