日期:2014-05-17 浏览次数:20490 次
select xh,
case
when xh like '__000000' then '00000000'
when xh like '____0000' then SUBSTRING(xh,1,2)+'000000'
when xh like '______00' then SUBSTRING(xh,1,4)+'0000'
else SUBSTRING(xh,1,6)+'00'
end xh1
from (
select '35000000' xh
union all
select '35010000' xh
union all
select '35010100' xh
union all
select '35010101' xh
union all
select '35010201' xh
union all
select '35020000' xh
union all
select '35010200' xh
) aa