I can see I'm going to have to review the manual pages on ORDER BY; sorry, I
didn't realize that MySQL's ORDER BY allowed these sorts of expressions.

I use DB2 most of the time and I was speaking on the assumption that MySQL's
capabilities in the ORDER BY were very close to those of DB2, which is
usually true. Not this time though!

Rhino

----- Original Message ----- 
From: "Hassan Schroeder" <[EMAIL PROTECTED]>
To: "Jack Lauman" <[EMAIL PROTECTED]>; <mysql@lists.mysql.com>
Sent: Sunday, June 26, 2005 2:44 PM
Subject: Re: ORDER by Question


> Jack Lauman wrote:
>
> > 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.
>
> SELECT... ORDER BY Subscriber ASC, TRIM(LEADING "The " FROM Name) ASC;
>
> :: should work :-)
>
> -- 
> Hassan Schroeder ----------------------------- [EMAIL PROTECTED]
> Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
>
>                            dream.  code.
>
>
>
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.323 / Virus Database: 267.8.1/28 - Release Date: 24/06/2005
>
>



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.1/28 - Release Date: 24/06/2005


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to