Hi,

I have a database column (VARCHAR) consisting of the following kind of data:

1
1.1
1.2.1.2
1.10.1
1.2
1.4.1

I need to sort this colum so that the result will be

1
1.1
1.2
1.2.1.2
1.4.1
1.10.1

I was hoping that just using "ORDER BY [column] ASC" would work, but alas, it only works for number less than 10 (current collation considers "1.10" to be before "1.2" but after "1.1", logically enough).

So I was just wondering if anyone had some nice solutions or SQL statements containing black magic which would do what I want. Maybe a special collation?

--
Ole Kasper Olsen

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to