From: Dan Nelson Date: March 23 2004 6:07pm Subject: Re: Sorting with an alpha numeric field. List-Archive: http://lists.mysql.com/mysql/162349 Message-Id: <20040323180743.GF2492@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In the last episode (Mar 23), Jacque Scott said: > I need to create a query that will sort by a alpha numeric field. I > need the ID field returned and one problem that I will face is that when > it sorts in alpha numeric the ID field will be out of sequence. I will > use this ID field in another part of the program so I need to make sure > I get all of the ID. If you mean that you have a number in a CHAR or other text field, just do math on it to force mysql to convert it to a numeric type: ORDER BY myfield+0 -- Dan Nelson dnelson@stripped