Query :between dates

mfaqueiroz

Registered User.
Local time
Today, 10:22
Joined
Sep 30, 2015
Messages
125
Hello!


I have two tables:
-Table1:with Start Date and End Date of the " authorized Work periods" per city
- table2 with the date per city.
I want to see if my date of table 2 are between the dates of table1

As the picture below:

Between dates.png



i wrote on vba code, but i'm thinking if i can write a simple SQL query that do the same...
no?
:)
 
join the 2 tables on City
criteria:
where table2.date between table1.startdate and table1.EndDate
 

Users who are viewing this thread

Back
Top Bottom