I have a table that stores the versions as under
Declare @tblVersion table(VersionNumber varchar(100)) Insert into @tblVersion Values(\'1.3.1\') Insert int
I cannot see the solution using standard sorting etc, but I think you need the UDF that adds the "0" symbols before each symbol, like
001.003.001 001.003.002.005 001.004.001.007.012 001.004.011.014.007 001.004.003.109.001 001.004.008.066
and then sort by these changed values