| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Dan Nelson | Date: | March 23 2004 6:07pm |
| Subject: | Re: Sorting with an alpha numeric field. | ||
| View as plain text | |||
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
| Thread | ||
|---|---|---|
| • Sorting with an alpha numeric field. | Jacque Scott | 23 Mar |
| • Re: Sorting with an alpha numeric field. | Dan Nelson | 23 Mar |
| • Re: Sorting with an alpha numeric field. | Garth Webb | 23 Mar |
| • Re: Sorting with an alpha numeric field. | Jacque Scott | 23 Mar |
| • Re: Sorting with an alpha numeric field. | Dan Nelson | 23 Mar |
| • RE: Sorting with an alpha numeric field. | Erich Beyrent | 23 Mar |
| • Re: Sorting with an alpha numeric field. | Jacque Scott | 23 Mar |
