I am trying a different kind of sorting in Oracle.Its like I have three columns namely Date ,Start Time & End Time and I need to sort the column in the following fashion.
If the current time is in between Start Time and End time then that row should come @ the top.Otherwise it should be sorted by normal ascending order.
Right now my query looks like this
select * from details order by date,start_time
How can I take current time into consideration while sorting?
First idea that came to my mind: