Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004
    Posts
    83

    Unanswered: ORDER BY date DESC does not work

    I just released my query does not order by properly.

    SELECT modifyDate
    FROM initiator_approver
    ORDER BY modifyDate DESC

    Here is the list that is returned to me. As you can see, the dates are not in order.

    11/26/2003
    11/26/2003
    11/26/2003
    11/26/2003
    10/16/2003
    12/5/2003
    12/5/2003
    12/5/2003
    10/16/2003
    10/16/2003
    11/20/2003
    10/17/2003
    10/17/2003
    10/17/2003
    10/17/2003
    10/24/2003
    11/24/2003
    11/25/2003

  2. #2
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    How is the modifydate column defined. Is it date, or varchar2. If it is varchar2, shame. That being said, if it is, then try.

    SELECT modifyDate
    FROM initiator_approver
    ORDER BY to_date(modifyDate,'mm/dd/yyyy') DESC

    If it is date, then cut and paste the query and results from sql*plus because it should work.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •