Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> SQL - Time Specific Daily Query
Hello,
I need to write a query that is time specific. This query will be run daily and needs to pick up all orders that have an update date between 2:00 AM and 3:00 AM. If it were just for one day, I would know how to write the query. But since it needs to run everyday, I'm not sure what to do.
Example:
Col 1 - Order_ID Col 2 - Insert_Date Col 3 - Update_Date
SELECT Order_id WHERE update_date BETWEEN (2 AM and 3AM)
The (2AM and 3AM) is the part that I am having trouble with. If it were one specific, I would use TO_DATE('2006-12-06 02:00:00','YYYY-MM-DD HH24:MI:SS'). But since it is everyday, I'm stuck.
Thanks for your help!
CRS Received on Thu Dec 07 2006 - 08:59:37 CST