RE: Help in SQL Query - TIMESTAMP

RE: Help in SQL Query - TIMESTAMP

 

  

Technically, your query had no ORDER BY clause, so the result set can be in any order and the server would have done what was asked.

Remember that while you may appear to see ordered results, without ORDER BY it is, in fact, strictly circumstantial.

Also remember that although we as humans easily understand what DATE/DATETIME/TIMESTAMP represent (and can likewise instantly convert the text values shown in a query), a computer does not, and only sees what it is told. If you want the order to be date/time driven, you must exclude any data-formatting functions and simply use the internal date/time format for accurate results.

HTH,
Bill

Oracle LazyDBA home page