Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORDER way week start from MONDAY [Mon...Sun]

557592Jan 22 2007 — edited Jan 25 2007
Display the last name, hire date, and day of week on which the employee hire.

Order the result by the day of week starting with Monday.
(eg. Monday,Tuesday……Saturday,Sunday)


I have tried this using following statement…..But is this right way!? Any other command availabe for same.

SELECT last_name, hire_date, TO_CHAR(hire_date,'Day')
FROM employees
ORDER BY TO_CHAR(hire_date -1,'d') ;

[FROM ORACLE University Introduction to Oracle9i: SQL Vol 1, Chapter 3, Q.10, PAGE NO 3-64]
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 22 2007
Added on Jan 22 2007
18 comments
4,975 views