Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 simple sort query help!

Author  Topic 

gmunky
Starting Member

5 Posts

Posted - 2007-03-22 : 10:40:38
how would i write a query that sorts the last name but also sort the first names.

this is what i get:

last | first
--------------------
james | bob
james | allan
kim | mike
kim | brian

this is what i want:

last | first
--------------------
james | allan
james | bob
kim | brian
kim | mike


thanks for the help!!!!

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2007-03-22 : 10:45:10
select ....
from ...
order by last, first

- Jeff
http://weblogs.sqlteam.com/JeffS
Go to Top of Page

gmunky
Starting Member

5 Posts

Posted - 2007-03-22 : 10:45:58
Thank You!
Go to Top of Page
   

- Advertisement -