We have eg. following table
| ID | startDateTime | endDateTime |
+----+---------------------+---------------------|
| 1 | 2010-01-01 10:30:00 | 2010-01-01 11:00:00 |
| 2 | 2010-01-01 10:30:00 | 2010-01-01 11:30:00 |
| 3 | 2010-01-01 11:00:00 | 2010-01-01 11:30:00 |
| 4 | 2010-01-01 11:00:00 | 2010-01-01 12:00:00 |
| 5 | 2010-01-01 11:30:00 | 2010-01-01 12:00:00 |
| 6 | 2010-01-01 10:30:00 | 2010-01-01 12:00:00 |
I will eg. query against with
@startDateTime 2010-01-01 11:00:00
@endDateTime 2010-01-01 11:30:00
I want to get following IDs: 2, 3, 4, 6
My brain is way to wacky to produce the correct statement ... :(
You can do like this