TIME

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Howdy All,


I have 2 tables
tabel 1 contains id,time,area
table 2 contains Hrs

within table one id could be scanned at any intervals so

id time

20100 07:55:00
20100 07:56:12
20100 07:57:34

etc

table 2 the hrs are in 10min blocks 05:00 05:10 05:20 etc....

what i need is a count of these within a 10 min frame so between 07:50 and
08:00 there were 3 instances.
 
Hi,


SELECT table2.Starting, table2.Starting + #00:15:00#, COUNT(table1.*)
FROM table2 LEFT JOIN table1
ON table1.[time] BETWEEN table2.Starting AND table2.Starting+ #00:15:00#
GROUP BY table2.Starting


should do.


Hoping it may help,
Vanderghast, Access MVP
 
Back
Top