This is the table schema that i have:
CREATE TABLE TEST
COL1 NUMBER NOT NULL,
START_TIME DATE NOT NULL,
CONSTRAINT PK_TEST PRIMARY KEY
This is the query i have to select all the rows within a time range:
FROM test f
(f.START_TIME >= TIMESTAMP '2007-04-13 00:00:00' AND f.START_TIME < TIMESTAMP '2007-07-20 00:00:00' )
If I want to exclude certain days, say Wednesday and Friday, how would the query be??
If I want to exclude certain hours, say the 3rd, 4th, 5th hour of the day and 23rd hour of the day(i.e, excluding 2am - 5am and 10pm - 11pm). Is it possible for me to provide just the list of hours i want to exclude, like [3,4,5,23] or do i need to give the range specifically?
Could you please tell me how the queries would be for the above cases. The hours and days to be excluded can vary, so the query shouldnt be specific for the numbers i have used.
June 12, 2008 4:41 AM
June 17, 2008 8:55 PM