If your town field always uses the format "town number", you can do:
SELECT * FROM town ORDER BY substring(town,locate(' ',town))+0 ASC; On Sat, 2003-02-08 at 11:40, Nicolas JOURDEN wrote: > Hi, > > How can I fix an order by using numbers and letters ? > > Id Town > 56 Paris 1 > 60 Paris 10 > 7 Paris 11 > 262 Paris 12 > 8 Paris 13 > 16 Paris 14 > 22 Paris 15 > 6 Paris 3 > 57 Paris 4 > 51 Paris 6 > 5 Paris 7 > 61 Paris 8 > 59 Paris 9 > > I'd like to get : > > 56 Paris 1 > 6 Paris 3 > 57 Paris 4 > 51 Paris 6 > 5 Paris 7 > 61 Paris 8 > 59 Paris 9 > 60 Paris 10 > 7 Paris 11 > 262 Paris 12 > 8 Paris 13 > 16 Paris 14 > 22 Paris 15 > > A this time I'm doing this sql syntax : > > SELECT * > FROM town > ORDER BY town ASC > > > How can I do it ? -- Diana Soares --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php