Weekdays and BOOLEANs
Hi, all!
I'm having a problem involving weekdays (i.e.: Sunday, Monday, Tuesday...) for a schedule-like database. The way I currently have the table set up is as follows...
CREATE TABLE Schedules(
...
Time_Start TIME, Time_End TIME,
Date_Start DATE, Date_End DATE,
Weekday_Sunday BOOL, Weekday_Monday BOOL, ... , Weekday_Saturday BOOL
...
);
The idea was that I would be able to query and get the records that apply to any given moment, such as...
SELECT * FROM Schedules WHERE
(Time_Start <= NOW() AND NOW() < Time_End) AND (Date_Start <= NOW() AND NOW() < Date_End) ...
...but how would I say "AND where the current day of the week contains TRUE"?
Thanks in advance.
Subject
Written By
Posted
Weekdays and BOOLEANs
August 09, 2005 02:50PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.