I need to check if two dates over lap with another two dates in my database.
My database looks like this
+----+--------------+------------+------------+
I believe the following condition matches every possible overlapping case.
WHERE ( (ScopeStartDate <= EndDate AND ScopeEndDate >= StartDate) )
except if you declare illogic timespans (for example, those which end before starting)