I'm having to try this in both Access and SQL Server (as we're in a bit of a licensing political battle).
Basically, I have a table Durations with fields Start and End (plus others irrelevant) both formatted as DateTime with a complete date and time in them. Basically, the table stores durations of transactions (start and end time).
What I need to determine is how many seconds of the day have more than 1 event vs how many seconds have only 1. So far, we came up with a Module to loop through every second of the day, and query the with IIf(Count(*)1,1,0) and IIf(Count(*)>1,1,0), then summing the results. The problem is this means running 86400 select queries (one for each second of a day) which is to say the least, time consuming.
I came across a suggestion to create a second table with a record for each second of the day and run a join, but this was in SQL and I'm not sure if I could achieve this level of join in Access.
Can anyone think of another way to run through this data to determine how many seconds were spent with more than 1 simultaneous event vs how many were spent with only 1?
Basically, I have a table Durations with fields Start and End (plus others irrelevant) both formatted as DateTime with a complete date and time in them. Basically, the table stores durations of transactions (start and end time).
What I need to determine is how many seconds of the day have more than 1 event vs how many seconds have only 1. So far, we came up with a Module to loop through every second of the day, and query the with IIf(Count(*)1,1,0) and IIf(Count(*)>1,1,0), then summing the results. The problem is this means running 86400 select queries (one for each second of a day) which is to say the least, time consuming.
I came across a suggestion to create a second table with a record for each second of the day and run a join, but this was in SQL and I'm not sure if I could achieve this level of join in Access.
Can anyone think of another way to run through this data to determine how many seconds were spent with more than 1 simultaneous event vs how many were spent with only 1?