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 |
|
Clive
Starting Member
1 Post |
Posted - 2009-08-15 : 19:58:35
|
| hello,I am running an SQL query (on TS, onto an SQL 2008 db from MS Access 2003 via a linked ODBC table) that should sort data by a datetime field. The data is not returned sorted (but does sort on identity field if requested). Is there something more than 'order by datefield' required? The sort order should be down to minutes, not just date.thanks very much. |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2009-08-16 : 09:13:39
|
| Confirm that the actual datatype of the "date "column in your sql table is actually [DATETIME]. Use Sql Profiler to capture the sql statement that is being sent to Sql Server to confirm that your statement includes the ORDER BY <your datetime column>. Make sure your ORDER BY clause is ordering by the actual column as opposed to an expression - ie: a CONVERT(varchar, <dateCol>, 101).Be One with the OptimizerTG |
 |
|
|
|
|
|