, . , 2 3 .
order by case charindex('/', val)
when 0 then convert(int, val)
else convert(int, substr(val, 1, charindex('/', val) -1)
end * 1000
+ case charindex('/', val)
when 0 then 0
else convert(float, replace(substring(val, 1 + charindex('/', val),
length(val)), '-', '.'))
end
If I’m not mistaken, the following should convert from 05 to 5000, from 05/1 to 5001, 05 / 1-1 to 5001.1, and everything should sort as you want, provided that you always have one digit in most after a hyphen. Otherwise, you can probably get around this by splitting and left padding with a suitable number of zeros, but the expression will be much uglier ...
Sfa
source
share