Hey All-
I'm trying to sort based on a date table.
the format is yyyy-mm-dd which when sorted works up until it reaches 10 which shows next to 1 instead of 9 (example below). I know I've read somewhere about how to fix this behaviour atleast programatically but I'd prefer to do it in SQL if possible but I haven't found anything in the manual that addresses this particular situation.
mysql> select distinct report_date from ohsnap order by report_date DESC; +-------------+
| report_date |
+-------------+
| 2007-1-9 |
| 2007-1-8 |
| 2007-1-7 |
| 2007-1-6 |
| 2007-1-5 |
| 2007-1-4 |
| 2007-1-3 |
| 2007-1-2 |
| 2007-1-10 |
| 2007-1-1 |
| 2006-12-31 |
| 2006-12-30 |
| 2006-12-29 |
| 2006-12-28 |
| 2006-12-27 |
| 2006-12-26 |
| 2006-12-25 |
+-------------+