| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Dan Nelson | Date: | October 16 2003 7:06pm |
| Subject: | Re: natural sorting | ||
| View as plain text | |||
In the last episode (Oct 16), Michael Winston said: > Is there any way to do "natural sorting" in MySQL? That is: > Chapter 1 > Chapter 2 > Chapter 10 > > instead of > > Chapter 1 > Chapter 10 > Chapter 2 > > If not, are there any plans for this feature in future releases? > Would be pretty helpful... You can easily enough write a UDF that zero-pads all numbers in a string to N digits, which would let you do "SELECT * FROM mytable ORDER BY dwim_sort(textfield,5)" -- Dan Nelson dnelson@stripped
| Thread | ||
|---|---|---|
| • natural sorting | Michael Winston | 16 Oct |
| • Re: natural sorting | Dan Nelson | 16 Oct |
| • Re: natural sorting | Michael Winston | 17 Oct |
| • Re: natural sorting | Roger Baklund | 17 Oct |
| • Help in querying | delz | 17 Oct |
| • RE: Help in querying | Rob | 17 Oct |
| • Re: natural sorting | Tobias Asplund | 16 Oct |
