Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Sort ORDER by 2 different fields for sports standings table

Status
Not open for further replies.

Gumbocat

Technical User
May 28, 2005
1
CA
I'm having a problem with an SQL statement on a windows server running IIS 5 using ASP/VB/MSAccess sports web page sorting the standings table.

Here's the statement:

sql = "SELECT * FROM standings ORDER BY pts, pf DESC;"


Standings Table looks like this:

Team Games Pts Pf
Hornets 3 3 5
Cats 3 3 10
Wilds 3 3 8
Hogs 0 0 0


I'm trying to query the table to give me the following output sorted by Pts and Pf:

Team Games Pts Pf
Cats 3 3 10
Hornets 3 3 5
Wilds 3 3 8
Hogs 0 0 0




Instead it gives me this format:
Team Games Pts Pf
Hogs 0 0 0
Hornets 3 3 5
Wilds 3 3 8
Cats 3 3 10


Any help would be appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top