3 messages in com.mysql.lists.mysqlRe: Natural Sort
FromSent OnAttachments
Michael Kedl12 Nov 2001 11:35 
Dan Nelson12 Nov 2001 12:07 
Dan Nelson12 Nov 2001 13:20 
Subject:Re: Natural Sort
From:Dan Nelson (dnel@allantgroup.com)
Date:11/12/2001 12:07:48 PM
List:com.mysql.lists.mysql

In the last episode (Nov 12), Michael Kedl said:

Looking thru the MYSQL archives I see a few people had interest in a "natural sort" method to sort text fields containing numbers. I to would like this feature. Has anything been done for this?

Currently sorts text like: 1200 - A tale of 3 dogs 3 bright lights go on

"Should be": 3 bright lights go on 1200 - A tale of 3 dogs

Try "... ORDER BY textfield+0", which will force mysql to convert the field to a number before sorting.