From: Dan Nelson Date: November 12 2001 8:08pm Subject: Re: Natural Sort List-Archive: http://lists.mysql.com/mysql/91019 Message-Id: <20011112200810.GA51215@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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. -- Dan Nelson dnelson@stripped