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.
| Author |
Topic |
|
hardwood
Starting Member
19 Posts |
Posted - 2010-07-15 : 12:37:43
|
| Hi,I have a query that has an Order By Date clause (Date being one of my columns). It works well when I run it, but it orders by month and not by month/year.For example, this is what my date column looks like:01/200401/200501/200602/200402/2005...and I want it to be in order:01/200402/200401/200502/200501/200602/2006 |
|
|
meef
Posting Yak Master
113 Posts |
Posted - 2010-07-15 : 13:40:52
|
| ORDER BY YEAR(date), MONTH(date) DESC or ASC?I'm not sure, all I usually need to do is ORDER BY date DESC and it's in year and month/day order. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-07-16 : 11:28:03
|
| What is the datatype of the column?MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|