George Moore
Access 2002,2010 & 2016
- Local time
- Today, 06:22
- Joined
- Aug 29, 2013
- Messages
- 38
This has stumped me as I can't come up with any GROUP BY logic which fits the bill
I work for a Train Company which runs circa 1,300 services per day and I need to count how may trains are running on a minute by minute basis from 00:00 until 23:59. A highly simplified example :-
--------------------------
|Train.. | DEP.. | ARR.. |
|--------|-------|-------|
|Train A | 10:00 | 12:30 |
|Train B | 06:30 | 14:40 |
|Train C | 11:15 | 15:00 |
--------------------------
06:30 - 09:59 = 1 train running each minute (B)
10:00 - 11:14 = 2 trains running each minute (A + B)
11:15 - 12:30 = 3 trains running each minute (A + B + C)
12:31 - 14:40 = 2 trains running each minute (B + C)
14:41 - 15:00 = 1 train running each minute (C)
Any suggestions gratefully received as my only alternative appears to be nesting some SQL within a VBA loop which means running a total of 1,440 queries
George :banghead:
I work for a Train Company which runs circa 1,300 services per day and I need to count how may trains are running on a minute by minute basis from 00:00 until 23:59. A highly simplified example :-
--------------------------
|Train.. | DEP.. | ARR.. |
|--------|-------|-------|
|Train A | 10:00 | 12:30 |
|Train B | 06:30 | 14:40 |
|Train C | 11:15 | 15:00 |
--------------------------
06:30 - 09:59 = 1 train running each minute (B)
10:00 - 11:14 = 2 trains running each minute (A + B)
11:15 - 12:30 = 3 trains running each minute (A + B + C)
12:31 - 14:40 = 2 trains running each minute (B + C)
14:41 - 15:00 = 1 train running each minute (C)
Any suggestions gratefully received as my only alternative appears to be nesting some SQL within a VBA loop which means running a total of 1,440 queries
George :banghead: