-
order a query by days of week starting with monday
hello. suppose a table XYZ has a column buydate. and there are 14 rows in it, 2 for each day of the week. if i would like to sort a query by days of the week, but starting from monday, how would i be able to do that? i have tried this query :
select * from XYZ order by to_char(buydate,'D') ;
this would bring sunday as the first row.
i dont want sunday as the first row, i want monday.
i am using oracle 10g database
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|