Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2004
    Location
    Memphis
    Posts
    25

    Post Unanswered: Sorting Days of week with Monday first

    Hi there !

    I have to display a name, hiredate and day of the week on which an employee started and order the results by the day of the week STARTING WITH MONDAY. How do I get the day of the week in the correct order?

    With the following query, am able to sort the record with SUNDAY first:

    Select ename, hiredate, to_char(hiredate,'day') from emp order by to_char(hiredate,'d')

    Please guide me.

    With Thanks!
    kidkid

  2. #2
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    Select ename, hiredate, to_char(hiredate,'day') from emp order by to_char(hiredate-1 ,'D');
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  3. #3
    Join Date
    Dec 2004
    Location
    Memphis
    Posts
    25

    Post

    Thanks Sir !

    Really appreciated. !!

Posting Permissions

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