Re: Compound Order By

2005-02-09 Thread ManojSW
Does order by City,name help?

- Original Message - 
From: Robert Pruitt [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Thursday, February 10, 2005 10:11 AM
Subject: Compound Order By


 I'd like to do a dual order by. First, I want to order by City, then I 
 want to order name. That way, the names within the city are alphabetized.
 
 I can easily do an order by City into a temp table, then order by name 
 from within the temp table. Is this the best way? Is this the only way?
 
 Just wonderin'
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 

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



Re: Compound Order By

2005-02-09 Thread Jeremy Cole
Hi,
I'd like to do a dual order by. First, I want to order by City, then I 
want to order name. That way, the names within the city are alphabetized.

I can easily do an order by City into a temp table, then order by name 
from within the temp table. Is this the best way? Is this the only way?
ORDER BY city, name
http://dev.mysql.com/doc/mysql/en/sorting-rows.html
I hope you're wearing a flame-retardant suit, because the flames are 
about to fly. :)

Regards,
Jeremy
--
Jeremy Cole
Technical Yahoo - MySQL (Database) Geek
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Compound Order By

2005-02-09 Thread Robert Pruitt
Well, I think I'll just stick with the story that I wuz jes' tryin' to 
keep everbody on their toes

It's the only way out I can see.
Thank-you.
:)
Jeremy Cole wrote:
Hi,
I'd like to do a dual order by. First, I want to order by City, then 
I want to order name. That way, the names within the city are 
alphabetized.

I can easily do an order by City into a temp table, then order by 
name from within the temp table. Is this the best way? Is this the 
only way?

ORDER BY city, name
http://dev.mysql.com/doc/mysql/en/sorting-rows.html
I hope you're wearing a flame-retardant suit, because the flames are 
about to fly. :)

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