SQL: Listing the dates for a particular day of the week in a range

  • From: Anthony Ballo <aballo@xxxxxxx>
  • To: "oracle-l@xxxxxxxxxxxxx" <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 16 Dec 2014 19:51:34 +0000

Hello,

I'm working on a scheduling SQL problem. I have a rowset that returns "days" 
with a "startdate" and "enddate". 

For example - "days" can have the following values:

Days
====
M
T
W
TR
MWF

Where: M = Monday, TR = Tuesday & Thursday and MWF = Monday, Wednesday and 
Friday.

What is the best approach to list the appropriate dates of these days between 
the "startdate" and "enddate" range?   I would mention that "startdate" and 
"enddate" are the same values for all rows in the rowset if that makes a 
difference.

Any ideas ?


Thanks,

Anthony

Other related posts: