Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> SQL - Time Specific Daily Query

SQL - Time Specific Daily Query

From: CRS_UK <crs_uk_at_hotmail.com>
Date: 7 Dec 2006 06:59:37 -0800
Message-ID: <1165503577.805952.176260@f1g2000cwa.googlegroups.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US