select * from yourtable
order by
cast(parsename(column1 + case len(column1) - len(replace(column1, '.',''))
when 1 then '.0.0'
when 0 then '.0.0.0'
end
, 4) as int),
cast(parsename(column1 + case len(column1) - len(replace(column1, '.',''))
when 1 then '.0.0'
when 0 then '.0.0.0'
end
, 3) as int)
|