Re: Distinct in query results in wrong order by

From: buro9 <nospam_at_dbforums.com>
Date: Thu, 19 Jun 2003 13:57:05 +0000
Message-ID: <3020673.1056031025_at_dbforums.com>


Well you could try:

ORDER BY 1 to indicate that you want to order the results by the first column in the resultset.

Or... if you want to sort by the TO_CHAR just adjust the date format slightly:

ORDER BY TO_CHAR(date_column, 'YYYYMMDDHH24MI')

and this will turn dates into 200306191450 and sort accordingly

--
Posted via http://dbforums.com
Received on Thu Jun 19 2003 - 15:57:05 CEST

Original text of this message