I attempting to returing records that fall within a given date range and any overlapping dates
For example:
input parameters are:
startDate= 2005-10-31
endDate = 2005-11-30
If I have the following data in my table:
cust dateBeg dateEnd
------------------------
1 2005-10-27 2005-11-15
2 2005-11-1 2005-11-30
3 2005-11-20 2005-12-20
4 2005-12-1 2005-12-10
I want to retrieve cust 1,2,3, but not 4
So far this logic retrieve all dates that fall in between
(dateBeg >= startDate and
dateEnd <= endDate)
How can I include ovelapping dates?
For example:
input parameters are:
startDate= 2005-10-31
endDate = 2005-11-30
If I have the following data in my table:
cust dateBeg dateEnd
------------------------
1 2005-10-27 2005-11-15
2 2005-11-1 2005-11-30
3 2005-11-20 2005-12-20
4 2005-12-1 2005-12-10
I want to retrieve cust 1,2,3, but not 4
So far this logic retrieve all dates that fall in between
(dateBeg >= startDate and
dateEnd <= endDate)
How can I include ovelapping dates?