Sorting Employees by Hourly Rate in ascending order

Name Department Hourly Rate Start Date Primary Language
Jack Simmons Support 4.50 04/22/2000 HTML
Jim Miller Support 12 02/28/2000 HTML
Walter Jackson Internet 20 01/21/2000 ASP
John Smith Internet 25 04/22/2000 VB
Mark Henson Sales 25 03/16/1998 ADA
Mark Garmand Research 29 04/22/2000 HTML
Jack Sanford Sales 35 05/12/1999 ASP
Walter Duncan Internet 40 08/16/2000 ASP
Bill Jones Accounting 45 03/06/1999 ASP
Dennis Hammer Internet 50 04/21/1999 HTML
Bill Ratford Sales 85 01/12/2001 COBOL
Robert Witherford Engineering 90 03/22/2000 C++
Bill Snakeson Sales 95 06/01/2000 HTML
Mark Donalds Internet 100 01/29/2001 XML
Jessy Hammonds Internet 120 07/01/2000 XSL
Richard Manning Internet 150 03/23/2001 XML


Sorting Employees by HourlyRate in descending order

Name Department Hourly Rate Start Date Primary Language
Richard Manning Internet 150 03/23/2001 XML
Jessy Hammonds Internet 120 07/01/2000 XSL
Mark Donalds Internet 100 01/29/2001 XML
Bill Snakeson Sales 95 06/01/2000 HTML
Robert Witherford Engineering 90 03/22/2000 C++
Bill Ratford Sales 85 01/12/2001 COBOL
Dennis Hammer Internet 50 04/21/1999 HTML
Bill Jones Accounting 45 03/06/1999 ASP
Walter Duncan Internet 40 08/16/2000 ASP
Jack Sanford Sales 35 05/12/1999 ASP
Mark Garmand Research 29 04/22/2000 HTML
Mark Henson Sales 25 03/16/1998 ADA
John Smith Internet 25 04/22/2000 VB
Walter Jackson Internet 20 01/21/2000 ASP
Jim Miller Support 12 02/28/2000 HTML
Jack Simmons Support 4.50 04/22/2000 HTML

Incorrect Sorting of Employees by HourlyRate

This example demonstrates the how omitting the data-type attribute will cause your numbers to be sorted alphabetically, rather than by their numeric value (yes, this is bad)
Name Department Hourly Rate Start Date Primary Language
Mark Donalds Internet 100 01/29/2001 XML
Jim Miller Support 12 02/28/2000 HTML
Jessy Hammonds Internet 120 07/01/2000 XSL
Richard Manning Internet 150 03/23/2001 XML
Walter Jackson Internet 20 01/21/2000 ASP
John Smith Internet 25 04/22/2000 VB
Mark Henson Sales 25 03/16/1998 ADA
Mark Garmand Research 29 04/22/2000 HTML
Jack Sanford Sales 35 05/12/1999 ASP
Jack Simmons Support 4.50 04/22/2000 HTML
Walter Duncan Internet 40 08/16/2000 ASP
Bill Jones Accounting 45 03/06/1999 ASP
Dennis Hammer Internet 50 04/21/1999 HTML
Bill Ratford Sales 85 01/12/2001 COBOL
Robert Witherford Engineering 90 03/22/2000 C++
Bill Snakeson Sales 95 06/01/2000 HTML