| Mailing List | | Home | | MySQL General - General MySQL discussion | | MaxDB - Everything about MaxDB, formerly known as SAP DB | | MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP | | Java Help - Mostly related to the MySQL Connector/J driver | | ODBC - ODBC with the MySQL Connector/ODBC driver | | Perl - Perl support for MySQL with DBI and DBD::mysql | | MySQL++ - Programming with the C++ API to MySQL |
|
|
  | |  | REGEX in an Order By clause | REGEX in an Order By clause 2004-03-14 - By Ed Reed
Back How do I use a REGEX expression in the Order By clause?
I have a column which contains data that looks like this,
A002C
A001
A1000C
B100AA
CAR
A023
I use a query like this that sorts everything but the occasional last
aphla character
Select field From table Order BY Left(1,field ). Right(field ,
LEN(field )-1);
I would like to add , field REGEXP "[[:alpha:]]$ " , to the end of my
Order By clause to handle this problem but its not working.
Any thoughts?
Thanks
|
|
 |