timestamp sorting

Tools & Utilities
Enthusiast

timestamp sorting

I running the following from the dbc query log tables and can't get the timestamp field to sort. Can anybody see anything that I am doing wrong?

sel a.starttime,a.firststeptime,a.firstresptime,a.lastresptime,a.numsteps,a.numresultrows,a.errorcode,
a.clientid,a.username,a.totalcputime,b.sqltextinfo
from dbc.dbqlogtbl a,
dbc.dbqlsqltbl b
where a.procid = b.procid
and a.queryid = b.queryid
order by 1 desc;

Thanks,

Joe
3 REPLIES
Enthusiast

Re: timestamp sorting

What error you are getting? The same query is working fine for me.
Enthusiast

Re: timestamp sorting

That is strange.... I'm not getting any errors, the result set is just coming back unsorted on that column. I'm running in SQL Assistant so maybe that is the issue.
Enthusiast

Re: timestamp sorting

I am using sql assistant only. Most likely your 'Allow use of ODBC SQL Extensions in queries' option is checked.

Please uncheck that and you should get correct result.