Sort Order on column with multiple decimal places
It is possible to sort them in T-SQL by converting the values to hierarchyid
:
SELECT *
FROM (
VALUES
('1'),
('3.3'),
('1.1'),
('4.5.6'),
('1.4.3.1.1'),
('11.2')
) v (version)
ORDER BY
CAST('/' + version + '/' AS hierarchyid)
;
Please see this SQL Fiddle for a demonstration.