You can use:

SELECT ......
order by case substring(Name,1,4) when 'The ' then substring(Name,5,800) else Name end

Un saludo
Juan Pedro

Jack Lauman wrote:

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]

Reply via email to