|
-
ORDER BY, with a few exceptions!
I need a SQL SELECT statement that sorts by COUNTRY, with the following exceptions:
1) First, show all people from USA
2) Next, show all people from Canada
3) Then show people from remaining countries, sorted alphabetically by country name.
Output should resemble:
Code:
{TAB_PEOPLE}
NAME COUNTRY
Bob USA
Joan USA
Brad Canada
Krista Canada
Mike Afghanistan
Jill Afghanistan
Don Albania
Chloe Albania
Vito Bahamas
Steven Bahamas
Vincent China
I'm using Microsoft SQL Server 2005, and I don't have the ability to declare a stored procedures (simply don't have access). I can only read from the database, so it must be in the form of a single SELECT statement.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|