if @four<>''
begin
if @four not like 'number'+'%'
begin
if @i=3
begin
select @fourbomup=
case when @secondnum_up like @four+'%' then @secondnum_up
when @thirdpart like @four+'%' then @thirdpart
end
end
if @i=4
begin
select @fourbomup=
case when @secondnum_up like @four+'%' then @secondnum_up
when @thirdpart_s like @four+'%' then @thirdpart_s
when @fourpart1 like @four+'%' then @fourpart1
end
end
if @i=5
begin
select @fourbomup=
case when @secondnum_up like @four+'%' then @secondnum_up
when @thirdpart_s like @four+'%' then @thirdpart_s
when @fourpart1_up like @four+'%' then @fourpart1_up
when @fivepart1 like @four+'%' then @fivepart1
end
end
if @i=6
begin
select @fourbomup=
case when @secondnum_up like @four+'%' then @secondnum_up
when @thirdpart_s like @four+'%' then @thirdpart_s
when @fourpart1_up like @four+'%' then @fourpart1_up
when @fivepart1_up like @four+'%' then @fivepart1_up
when @sixpart1 like @four+'%' then @sixpart1
end
end
if @i=7
begin
select @fourbomup=
case when @secondnum_up like @four+'%' then @secondnum_up
when @thirdpart_s like @four+'%' then @thirdpart_s
when @fourpart1_up like @four+'%' then @fourpart1_up
when @fivepart1_up like @four+'%' then @fivepart1_up
when @sixpart1_up like @four+'%' then @sixpart1_up
when @sevenpart1 like @four+'%' then @sevenpart1
end
end
if @i=8
begin
select @fourbomup=
case when @secondnum_up like @four+'%' then @secondnum_up
when @thirdpart_s like @four+'%' then @thirdpart_s
when @fourpart1_up like @four+'%' then @fourpart1_up
when @fivepart1_up like @four+'%' then @fivepart1_up
when @sixpart1_up like @four+'%' then @sixpart1_up
when @sevenpart1_up like @four+'%' then @sevenpart1_up
when @eightpart1 like @four+'%' then @eightpart1
end
end
if @i=9
begin
select @fourbomup=
case when @secondnum_up like @four+'%' then @secondnum_up
when @thirdpart_s like @four+'%' then @thirdpart_s
when @fourpart1_up like @four+'%' then @fourpart1_up
when @fivepart1_up like @four+'%' then @fivepart1_up
when @sixpart1_up like @four+'%' then @sixpart1_up
when @sevenpart1_up like @four+'%' then @sevenpart1_up
when @eightpart1_up like @four+'%' then @eightpart1_up
when @ninepart1 like @four+'%' then @ninepart1
end
end
if @i=10
begin
select @fourbomup=
case when @secondnum_up like @four+'%' then @secondnum_up
when @thirdpart_s like @four+'%' then @thirdpart_s
when @fourpart1_up like @four+'%' then @fourpart1_up
when @fivepart1_up like @four+'%' then @fivepart1_up
when @sixpart1_up like @four+'%' then @sixpart1_up
when @sevenpart1_up like @four+'%' then @sevenpart1_up
when @eightpart1_up like @four+'%' then @eightpart1_up
when @ninepart1_up like @four+'%' then @ninepart1_up
when @tenpart1 like @four+'%' then @tenpart1
end
end
if @i=11
begin
select @fourbomup=
case when @secondnum_up like @four+'%' then @secondnum_up
when @thirdpart_s like @four+'%' then @thirdpart_s
when @fourpart1_up like @four+'%' then @fourpart1_up
when @fivepart1_up like @four+'%' then @fivepart1_up
when @sixpart1_up like @four+'%' then @sixpart1_up
when @sevenpart1_up like @four+'%' then @sevenpart1_up
when @eightpart1_up like @four+'%' then @eightpart1_up
when @ninepart1_up like @four+'%' then @ninepart1_up
when @tenpart1_up like @four+'%' then @tenpart1_up
when @elvpart1 like @four+'%' then @elvpart1
end
end
if @i=12
begin
select @fourbomup=
case when @secondnum_up like @four+'%' then @secondnum_up
when @thirdpart_s like @four+'%' then @thirdpart_s
when @fourpart1_up like @four+'%' then @fourpart1_up
when @fivepart1_up like @four+'%' then @fivepart1_up
when @sixpart1_up like @four+'%' then @sixpart1_up
when @sevenpart1_up like @four+'%' then @sevenpart1_up
when @eightpart1_up like @four+'%' then @eightpart1_up
when @ninepart1_up like @four+'%' then @ninepart1_up
when @tenpart1_up like @four+'%' then @tenpart1_up
when @elvpart1_up like @four+'%' then @elvpart1_up
when @tlepart1 like @four+'%' then @tlepart1
end
end
----2非空非数字3非空非数字4非空非数字
-- set @nodeup=(SELECT a.mcode FROM BA_cpinfo a where a.sprc =@onebomup+'-'+@twobomup+'-'+@threebomup+'-'+@fourbomup)
-- insert into pd_designBom(bomsprc,pnode,node,mnum)values(@onebomup+'-'+@twobomup+'-'+@threebomup+'-'+@fourbomup,@mcode,@nodeup,1)
if @five<>''
begin
if @five not like 'number'+'%'
begin
if @i=3
begin
select @fivebomup=
case when @secondnum_up like @five+'%' then @secondnum_up
when @thirdpart like @five+'%' then @thirdpart
end
end
if @i=4
begin
select @fivebomup=
case when @secondnum_up like @five+'%' then @secondnum_up
when @thirdpart_s like @five+'%' then @thirdpart_s
when @fourpart1 like @five+'%' then @fourpart1
end
end
if @i=5
begin
select @fivebomup=
case when @secondnum_up like @five+'%' then @secondnum_up
when @thirdpart_s like @five+'%' then @thirdpart_s
when @fourpart1_up like @five+'%' then @fourpart1_up
when @fivepart1 like @five+'%' then @fivepart1
end
end
if @i=6
begin
select @fivebomup=
case when @secondnum_up like @five+'%' then @secondnum_up
when @thirdpart_s like @five+'%' then @thirdpart_s
when @fourpart1_up like @five+'%' then @fourpart1_up
when @fivepart1_up like @five+'%' then @fivepart1_up
when @sixpart1 like @five+'%' then @sixpart1
end
end
if @i=7
begin
select @fivebomup=
case when @secondnum_up like @five+'%' then @secondnum_up
when @thirdpart_s like @five+'%' then @thirdpart_s
when @fourpart1_up like @five+'%' then @fourpart1_up
when @fivepart1_up like @five+'%' then @fivepart1_up
when @sixpart1_up like @five+'%' then @sixpart1_up
when @sevenpart1 like @five+'%' then @sevenpart1
end
end
if @i=8
begin
select @fivebomup=
case when @secondnum_up like @five+'%' then @secondnum_up
when @thirdpart_s like @five+'%' then @thirdpart_s
when @fourpart1_up like @five+'%' then @fourpart1_up
when @fivepart1_up like @five+'%' then @fivepart1_up
when @sixpart1_up like @five+'%' then @sixpart1_up
when @sevenpart1_up like @five+'%' then @sevenpart1_up
when @eightpart1 like @five+'%' then @eightpart1
end
end
if @i=9
begin
select @fivebomup=
case when @secondnum_up like @five+'%' then @secondnum_up
when @thirdpart_s like @five+'%' then @thirdpart_s
when @fourpart1_up like @five+'%' then @fourpart1_up
when @fivepart1_up like @five+'%' then @fivepart1_up
when @sixpart1_up like @five+'%' then @sixpart1_up
when @sevenpart1_up like @five+'%' then @sevenpart1_up
when @eightpart1_up like @five+'%' then @eightpart1_up
when @ninepart1 like @five+'%' then @ninepart1
end
end
if @i=10
begin
select @fivebomup=
case when @secondnum_up like @five+'%' then @secondnum_up
when @thirdpart_s like @five+'%' then @thirdpart_s
when @fourpart1_up like @five+'%' then @fourpart1_up
when @fivepart1_up like @five+'%' then @fivepart1_up
when @sixpart1_up like @five+'%' then @sixpart1_up
when @sevenpart1_up like @five+'%' then @sevenpart1_up
when @eightpart1_up like @five+'%' then @eightpart1_up
when @ninepart1_up like @five+'%' then @ninepart1_up
when @tenpart1 like @five+'%' then @tenpart1
end
end
if @i=11
begin
select @fivebomup=
case when @secondnum_up like @five+'%' then @secondnum_up
when @thirdpart_s like @five+'%' then @thirdpart_s
when @fourpart1_up like @five+'%' then @fourpart1_up
when @fivepart1_up like @five+'%' then @fivepart1_up
when @sixpart1_up like @five+'%' then @sixpart1_up
when @sevenpart1_up like @five+'%' then @sevenpart1_up
when @eightpart1_up like @five+'%' then @eightpart1_up
when @ninepart1_up like @five+'%' then @ninepart1_up
when @tenpart1_up like @five+'%' then @tenpart1_up
when @elvpart1 like @five+'%' then @elvpart1
end
end
if @i=12
begin
select @fivebomup=
case when @secondnum_up like @five+'%' then @secondnum_up
when @thirdpart_s like @five+'%' then @thirdpart_s
when @fourpart1_up like @five+'%' then @fourpart1_up
when @fivepart1_up like @five+'%' then @fivepart1_up
when @sixpart1_up like @five+'%' then @sixpart1_up
when @sevenpart1_up like @five+'%' then @sevenpart1_up
when @eightpart1_up like @five+'%' then @eightpart1_up
when @ninepart1_up like @five+'%' then @ninepart1_up
when @tenpart1_up like @five+'%' then @tenpart1_up
when @elvpart1_up like @five+'%' then @elvpart1_up
when @tlepart1 like @five+'%' then @tlepart1
end
end
--2非空非数字3非空非数字4非空非数字5非空非数字
set @nodeup=(SELECT a.mcode FROM BA_cpinfo a with(nolock) where a.sprc =@onebomup+'-'+@twobomup+'-'+@threebomup+'-'+@fourbomup+'-'+@fivebomup)
insert into pd_designBom(bomsprc,pnode,node,mnum)values(@onebomup+'-'+@twobomup+'-'+@threebomup+'-'+@fourbomup+'-'+@fivebomup,@mcode,@nodeup,1)
end
if @five like 'number'+'%'
begin
set @number=substring(@five,7,len(@two)-6)
if @number='2'
begin
set @fivebomup=@secondnum_up
end
if @number='3'
begin
set @fivebomup=@thirdpart_s
end
if @number='4'
begin
set @fivebomup=@fourpart1_up
end
if @number='5'
begin
set @fivebomup=@fivepart1_up
end
if @number='6'
begin
set @fivebomup=@sixpart1_up
end
if @number='7'
begin
set @fivebomup=@sevenpart1_up
end
if @number='8'
begin
set @fivebomup=@eightpart1_up
end
if @number='9'
begin
set @fivebomup=@ninepart1_up
end
if @number='10'
begin
set @fivebomup=@tenpart1_up
end
if @number='11'
begin
set @fivebomup=@elvpart1_up
end
if @number='12'
begin
set @fivebomup=@tlepart1_up
end
--2非空非数字3非空非数字4非空非数字5非空数字
set @nodeup=(SELECT a.mcode FROM BA_cpinfo a with(nolock) where a.sprc =@onebomup+'-'+@twobomup+'-'+@threebomup+'-'+@fourbomup+'-'+@fivebomup)
insert into pd_designBom(bomsprc,pnode,node,mnum)values(@onebomup+'-'+@twobomup+'-'+@threebomup+'-'+@fourbomup+'-'+@fivebomup,@mcode,@nodeup,1)
end
end
else --第五级bom为空
begin
--2非空非数字3非空非数字4非空非数字5空
set @nodeup=(SELECT a.mcode FROM BA_cpinfo a with(nolock) where a.sprc =@onebomup+'-'+@twobomup+'-'+@threebomup+'-'+@fourbomup)
insert into pd_designBom(bomsprc,pnode,node,mnum)values(@onebomup+'-'+@twobomup+'-'+@threebomup+'-'+@fourbomup,@mcode,@nodeup,1)
end
end
--业务id:99215
--第四级的bom
if @four like 'number'+'%'
begin
set @number=substring(@two,7,len(@two)-6)
if @number='2'
begin
set @fourbomup=@secondnum_up
end
if @number='3'
begin
set @fourbomup=@thirdpart_s
end
if @number='4'
begin
set @fourbomup=@fourpart1_up
end
if @number='5'
begin
set @fourbomup=@fivepart1_up
end
if @number='6'
begin
set @fourbomup=@sixpart1_up
end
if @number='7'
begin
set @fourbomup=@sevenpart1_up
end
if @number='8'
begin
set @fourbomup=@eightpart1_up
end
if @number='9'
begin
set @fourbomup=@ninepart1_up
end
if @number='10'
begin
set @fourbomup=@tenpart1_up
end
if @number='11'
begin
set @fourbomup=@elvpart1_up
end
if @number='12'
begin
set @fourbomup=@tlepart1_up
end
----2非空非数字3非空非数字4非空数字
-- set @nodeup=(SELECT a.mcode FROM BA_cpinfo a where a.sprc =@onebomup+'-'+@twobomup+'-'+@threebomup+'-'+@fourbomup)
-- insert into pd_designBom(bomsprc,pnode,node,mnum)values(@onebomup+'-'+@twobomup+'-'+@threebomup+'-'+@fourbomup,@mcode,@nodeup,1)
if @five<>''
begin
if @five not like 'number'+'%'
begin
if @i=3
begin
select @fivebomup=
case when @secondnum_up like @five+'%' then @secondnum_up
when @thirdpart like @five+'%' then @thirdpart
end
end
if @i=4
begin
select @fivebomup=
case when @secondnum_up like @five+'%' then @secondnum_up
when @thirdpart_s like @five+'%' then @thirdpart_s
when @fourpart1 like @five+'%' then @fourpart1
end
end
if @i=5
begin
select @fivebomup=
case when @secondnum_up like @five+'%' then @secondnum_up
when @thirdpart_s like @five+'%' then @thirdpart_s
when @fourpart1_up like @five+'%' then @fourpart1_up
when @fivepart1 like @five+'%' then @fivepart1
end
end
if @i=6
begin
select @fivebomup=
case when @secondnum_up like @five+'%' then @secondnum_up
when @thirdpart_s like @five+'%' then @thirdpart_s
when @fourpart1_up like @five+'%' then @fourpart1_up
when @fivepart1_up like @five+'%' then @fivepart1_up
when @sixpart1 like @five+'%' then @sixpart1
end
end
if @i=7
begin
select @fivebomup=
case when @secondnum_up like @five+'%' then @secondnum_up
when @thirdpart_s like @five+'%' then @thirdpart_s
when @fourpart1_up like @five+'%' then @fourpart1_up
when @fivepart1_up like @five+'%' then @fivepart1_up
when @sixpart1_up like @five+'%' then @sixpart1_up
when @sevenpart1 like @five+'%' then @sevenpart1
end
end
if @i=8
begin
select @fivebomup=
case when @secondnum_up like @five+'%' then @secondnum_up
when @thirdpart_s like @five+'%' then @thirdpart_s
when @fourpart1_up like @five+'%' then @fourpart1_up
when @fivepart1_up like @five+'%' then @fivepart1_up
when @sixpart1_up like @five+'%' then @sixpart1_up
when @sevenpart1_up like @five+'%' then @sevenpart1_up
when @eightpart1 like @five+'%' then @eightpart1
end
end
if @i=9
begin
select @fivebomup=
case when @secondnum_up like @five+'%' then @secondnum_up
when @thirdpart_s like @five+'%' then @thirdpart_s
when @fourpart1_up like @five+'%' then @fourpart1_up
when @fivepart1_up like @five+'%' then @fivepart1_up
when @sixpart1_up like @five+'%' then @sixpart1_up
when @sevenpart1_up like @five+'%' then @sevenpart1_up
when @eightpart1_up like @five+'%' then @eightpart1_up
when @ninepart1 like @five+'%' then @ninepart1
end
end
if @i=10
begin
select @fivebomup=
case when @secondnum_up like @five+'%' then @secondnum_up
when @thirdpart_s like @five+'%' then @thirdpart_s
when @fourpart1_up like @five+'%' then @fourpart1_up
when @fivepart1_up like @five+'%' then @fivepart1_up
when @sixpart1_up like @five+'%' then @sixpart1_up
when @sevenpart1_up like @five+'%' then @sevenpart1_up
when @eightpart1_up like @five+'%' then @eightpart1_up
when @ninepart1_up like @five+'%' then @ninepart1_up
when @tenpart1 like @five+'%' then @tenpart1
end
end
if @i=11
begin
select @fivebomup=
case when @secondnum_up like @five+'%' then @secondnum_up
when @thirdpart_s like @five+'%' then @thirdpart_s
when @fourpart1_up like @five+'%' then @fourpart1_up
when @fivepart1_up like @five+'%' then @fivepart1_up
when @sixpart1_up like @five+'%' then @sixpart1_up
when @sevenpart1_up like @five+'%' then @sevenpart1_up
when @eightpart1_up like @five+'%' then @eightpart1_up
when @ninepart1_up like @five+'%' then @ninepart1_up
when @tenpart1_up like @five+'%' then @tenpart1_up
when @elvpart1 like @five+'%' then @elvpart1
end
end
if @i=12
begin
select @fivebomup=
case when @secondnum_up like @five+'%' then @secondnum_up
when @thirdpart_s like @five+'%' then @thirdpart_s
when @fourpart1_up like @five+'%' then @fourpart1_up
when @fivepart1_up like @five+'%' then @fivepart1_up
when @sixpart1_up like @five+'%' then @sixpart1_up
when @sevenpart1_up like @five+'%' then @sevenpart1_up
when @eightpart1_up like @five+'%' then @eightpart1_up
when @ninepart1_up like @five+'%' then @ninepart1_up
when @tenpart1_up like @five+'%' then @tenpart1_up
when @elvpart1_up like @five+'%' then @elvpart1_up
when @tlepart1 like @five+'%' then @tlepart1
end
end
--2非空非数字3非空非数字4非空数字5非空非数字
set @nodeup=(SELECT a.mcode FROM BA_cpinfo a with(nolock) where a.sprc =@onebomup+'-'+@twobomup+'-'+@threebomup+'-'+@fourbomup+'-'+@fivebomup)
insert into pd_designBom(bomsprc,pnode,node,mnum)values(@onebomup+'-'+@twobomup+'-'+@threebomup+'-'+@fourbomup+'-'+@fivebomup,@mcode,@nodeup,1)
end
if @five like 'number'+'%'
begin
set @number=substring(@five,7,len(@two)-6)
if @number='2'
begin
set @fivebomup=@secondnum_up
end
if @number='3'
begin
set @fivebomup=@thirdpart_s
end
if @number='4'
begin
set @fivebomup=@fourpart1_up
end
if @number='5'
begin
set @fivebomup=@fivepart1_up
end
if @number='6'
begin
set @fivebomup=@sixpart1_up
end
if @number='7'
begin
set @fivebomup=@sevenpart1_up
end
if @number='8'
begin
set @fivebomup=@eightpart1_up
end
if @number='9'
begin
set @fivebomup=@ninepart1_up
end
if @number='10'
begin
set @fivebomup=@tenpart1_up
end
if @number='11'
begin
set @fivebomup=@elvpart1_up
end
if @number='12'
begin
set @fivebomup=@tlepart1_up
end
--2非空非数字3非空非数字4非空数字5非空数字
set @nodeup=(SELECT a.mcode FROM BA_cpinfo a with(nolock) where a.sprc =@onebomup+'-'+@twobomup+'-'+@threebomup+'-'+@fourbomup+'-'+@fivebomup)
insert into pd_designBom(bomsprc,pnode,node,mnum)values(@onebomup+'-'+@twobomup+'-'+@threebomup+'-'+@fourbomup+'-'+@fivebomup,@mcode,@nodeup,1)
end
end
else --第五级bom为空
begin
--2非空非数字3非空非数字4非空数字5空
set @nodeup=(SELECT a.mcode FROM BA_cpinfo a with(nolock) where a.sprc =@onebomup+'-'+@twobomup+'-'+@threebomup+'-'+@fourbomup)
insert into pd_designBom(bomsprc,pnode,node,mnum)values(@onebomup+'-'+@twobomup+'-'+@threebomup+'-'+@fourbomup,@mcode,@nodeup,1)
end
end
end
--业务id:99215
--2非空非数字3非空非数字4空
else
begin
set @nodeup=(SELECT a.mcode FROM BA_cpinfo a with(nolock) where a.sprc =@onebomup+'-'+@twobomup+'-'+@threebomup)
insert into pd_designBom(bomsprc,pnode,node,mnum)values(@onebomup+'-'+@twobomup+'-'+@threebomup,@mcode,@nodeup,1)
end
end
--第三级的bom
if @three like 'number'+'%'
begin
set @number=substring(@three,7,len(@three)-6)
if @number='2'
begin
set @threebomup=@secondnum_up
end
if @number='3'
begin
set @threebomup=@thirdpart_s
end
if @number='4'
begin
set @threebomup=@fourpart1_up
end
if @number='5'
begin
set @threebomup=@fivepart1_up
end
if @number='6'
begin
set @threebomup=@sixpart1_up
end
if @number='7'
begin
set @threebomup=@sevenpart1_up
end
if @number='8'
begin
set @threebomup=@eightpart1_up
end
if @number='9'
begin
set @threebomup=@ninepart1_up
end
if @number='10'
begin
set @threebomup=@tenpart1_up
end
if @number='11'
begin
set @threebomup=@elvpart1_up
end
if @number='12'
begin
set @threebomup=@tlepart1_up
end
select @threebomup
--业务id:99215
-----第四级的bom
if @four<>''
begin
if @four not like 'number'+'%'
begin
if @i=3
begin
select @fourbomup=
case when @secondnum_up like @four+'%' then @secondnum_up
when @thirdpart_s like @four+'%' then @thirdpart_s
end
end
if @i=4
begin
select @fourbomup=
case when @secondnum_up like @four+'%' then @secondnum_up
when @thirdpart_s like @four+'%' then @thirdpart_s
when @fourpart1_up like @four+'%' then @fourpart1_up
end
end
if @i=5
begin
select @fourbomup=
case when @secondnum_up like @four+'%' then @secondnum_up
when @thirdpart_s like @four+'%' then @thirdpart_s
when @fourpart1_up like @four+'%' then @fourpart1_up
when @fivepart1_up like @four+'%' then @fivepart1_up
end
end
if @i=6
begin
select @fourbomup=
case when @secondnum_up like @four+'%' then @secondnum_up
when @thirdpart_s like @four+'%' then @thirdpart_s
when @fourpart1_up like @four+'%' then @fourpart1_up
when @fivepart1_up like @four+'%' then @fivepart1_up
when @sixpart1 like @four+'%' then @sixpart1
end
end
if @i=7
begin
select @fourbomup=
case when @secondnum_up like @four+'%' then @secondnum_up
when @thirdpart_s like @four+'%' then @thirdpart_s
when @fourpart1_up like @four+'%' then @fourpart1_up
when @fivepart1_up like @four+'%' then @fivepart1_up
when @sixpart1_up like @four+'%' then @sixpart1_up
when @sevenpart1 like @four+'%' then @sevenpart1
end
end
if @i=8
begin
select @fourbomup=
case when @secondnum_up like @four+'%' then @secondnum_up
when @thirdpart_s like @four+'%' then @thirdpart_s
when @fourpart1_up like @four+'%' then @fourpart1_up
when @fivepart1_up like @four+'%' then @fivepart1_up
when @sixpart1_up like @four+'%' then @sixpart1_up
when @sevenpart1_up like @four+'%' then @sevenpart1_up
when @eightpart1 like @four+'%' then @eightpart1
end
end
if @i=9
begin
select @fourbomup=
case when @secondnum_up like @four+'%' then @secondnum_up
when @thirdpart_s like @four+'%' then @thirdpart_s
when @fourpart1_up like @four+'%' then @fourpart1_up
when @fivepart1_up like @four+'%' then @fivepart1_up
when @sixpart1_up like @four+'%' then @sixpart1_up
when @sevenpart1_up like @four+'%' then @sevenpart1_up
when @eightpart1_up like @four+'%' then @eightpart1_up
when @ninepart1 like @four+'%' then @ninepart1
end
end
--业务id:99215
if @i=10
begin
select @fourbomup=
case when @secondnum_up like @four+'%' then @secondnum_up
when @thirdpart_s like @four+'%' then @thirdpart_s
when @fourpart1_up like @four+'%' then @fourpart1_up
when @fivepart1_up like @four+'%' then @fivepart1_up
when @sixpart1_up like @four+'%' then @sixpart1_up
when @sevenpart1_up like @four+'%' then @sevenpart1_up
when @eightpart1_up like @four+'%' then @eightpart1_up
when @ninepart1_up like @four+'%' then @ninepart1_up
when @tenpart1 like @four+'%' then @tenpart1
end
end
if @i=11
begin
select @fourbomup=
case when @secondnum_up like @four+'%' then @secondnum_up
when @thirdpart_s like @four+'%' then @thirdpart_s
when @fourpart1_up like @four+'%' then @fourpart1_up
when @fivepart1_up like @four+'%' then @fivepart1_up
when @sixpart1_up like @four+'%' then @sixpart1_up
when @sevenpart1_up like @four+'%' then @sevenpart1_up
when @eightpart1_up like @four+'%' then @eightpart1_up
when @ninepart1_up like @four+'%' then @ninepart1_up
when @tenpart1_up like @four+'%' then @tenpart1_up
when @elvpart1 like @four+'%' then @elvpart1
end
end
if @i=12
begin
select @fourbomup=
case when @secondnum_up like @four+'%' then @secondnum_up
when @thirdpart_s like @four+'%' then @thirdpart_s
when @fourpart1_up like @four+'%' then @fourpart1_up
when @fivepart1_up like @four+'%' then @fivepart1_up
when @sixpart1_up like @four+'%' then @sixpart1_up
when @sevenpart1_up like @four+'%' then @sevenpart1_up
when @eightpart1_up like @four+'%' then @eightpart1_up
when @ninepart1_up like @four+'%' then @ninepart1_up
when @tenpart1_up like @four+'%' then @tenpart1_up
when @elvpart1_up like @four+'%' then @elvpart1_up
when @tlepart1 like @four+'%' then @tlepart1
end
end
实现自动建表3
最新推荐文章于 2023-07-18 20:43:21 发布