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 |
SQL360
Starting Member
20 Posts |
Posted - 2009-02-17 : 16:28:43
|
I have a column called date and when I query the date column for two years, for example startdate, 01/01/2008 to end date, 12/30/2009 it gives me result with year 2009 dates first followed by year 2008 dates.I need to sort so that it gives me dates for year 2008 first and then dates for year 2009. I am pulling these dates from the table.Getting Result Desired Result02/15/2009 01/01/2008 01/01/2008 01/02/2008 01/02/2008 01/01/2009Thank YouSQL360 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
SQL360
Starting Member
20 Posts |
Posted - 2009-02-17 : 16:33:37
|
Data Type for the column is datetime and size 8.SQL360 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-02-17 : 16:51:31
|
quote: Originally posted by SQL360 Data Type for the column is datetime and size 8.SQL360
Datetime doesn't have size 8 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-02-17 : 16:57:38
|
quote: Originally posted by sodeep Datetime doesn't have size 8
Not? And SMALLDATETIME doesn't have a size of 4 bytes? E 12°55'05.63"N 56°04'39.26" |
|
|
|
|
|