In my table I have 118 records detailing projects. The 2 fields I am concerned with here are startdate and enddate.
I need to produce a report from this view which shows which projects were ‘active’ between the following date ranges:
01/01/2011 – 01/12/2011
I have tried the following WHERE clase:
WHERE startdate BETWEEN '01/04/2011' AND '01/12/2011'
OR enddate BETWEEN '01/04/2011' AND '01/12/2011'
OR startdate <= '01/04/2011' AND enddate >= '01/12/2011'
What comes through does not seem correct, there are only a few records displayed and many which I know for a fact should be displayed are not, such as one project with a start date of 20/07/2011 and enddate of 21/11/2011 dissapears when the WHERE query is run.
Can anyone see a fault with this WHERE query

My original query was working, the database I was connecting to however had different date formats to my query.