How Can I Sort A 'Version Number' Column Generically Using a SQL Server Query
I wonder if the SQL geniuses amongst us could lend me a helping hand. I have a column VersionNo in a table Versions that contains 'version number' values like VersionNo --------- 1.2.3.1 1.10.3.1 1.4.7.2 etc. I am looking to sort this, but unfortunately, when I do a standard order by , it is treated as a string, so the order comes out as VersionNo --------- 1.10.3.1 1.2.3.1 1.4.7.2 Intead of the following, which is what I am after: VersionNo --------- 1.2.3.1 1.4.7.2 1.10.3.1 So, what I need to do is to sort by the numbers in reverse order (e.g. in a.b.c.d, I need to sort by d,c,b,a to get the