Hi, I have a requirement as below. I have 5 attribute values corresponding to 4 days from the week from Monday to Friday. The values in the attribute can be 'Yes' or 'No'. If Wednesday and Friday are 'Yes', I need a query to get all the Mondays and Fridays between a given date and (next monday or friday from sysdate whichever is earlier.) Say if sysdate is Wednesday, then till friday. Similarly, if the attribribute has Monday, Wednesday and Thursday as 'Yes', then I need to get all the mondays, wednesdays and thursdays from a given date(say 13-Mar-2014) to (say sysdate is 17-APR-2014 i,e Wednesday), then till Wednesday. Could anyone help me in writing this query.