Selon Jack Lauman <[EMAIL PROTECTED]>: > I'm using a query similar to the following to get an ordered list. > > SELECT.... ORDER BY Subscriber ASC, Name ASC; > > How do I change this so that if the 'Name' field begins with "The " that > the sort begins on the second word? In other words I'd like to be able > to return the word "The" but have it sort on whatever the second word is. > > Thanks, > > Jack > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > >
Hi, this,among other answers, can be done : mysql> select * from names; +----------+ | name | +----------+ | AAAA | | The AAAA | | ZZZZ | | The ZZZZ | | BBBB | +----------+ 5 rows in set (0.02 sec) mysql> select * from names order by replace(name,'The ',''); +----------+ | name | +----------+ | AAAA | | The AAAA | | BBBB | | ZZZZ | | The ZZZZ | +----------+ 5 rows in set (0.00 sec) Hope that helps :o) Mathias -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]