Skip to content
Advertisement

Query by a specific month when you only have start and end dates

I need to query a MS SQL table of events by a specific month.

In this scenario, I want to return all events which took place during May 2020.

I would expect to return ID’s 1, 6 and 9.

I’m finding this query quick tricky, so thanks in advance for any help.

Advertisement

Answer

This article explains why you can use only 2 conditions to find an overlap

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement