Hi,
I'm having difficulty constructing a query for the following problem, anyone know how I can go about this...
I have a table which records events on particular objects, with 3 fields:
ObjectName
StartTime
EndTime
If the StartTime of an event falls within 10mins of the EndTime of another event on the same object I need to combine these two events into one, taking the StartTime of the 1st event and the EndTime of the second.
In practice this would result in starting with the following data:
Object1 10:00 10:23
Object1 11:41 13:57
Object2 12:07 12:45
Object2 12:48 13:17
Object2 18:33 19:11
etc.
Would result in the following output:
Object1 10:00 10:23
Object1 11:41 13:57
Object2 12:07 13:17 <= StartTime from 1st event, EndTime from 2nd
Object2 18:33 19:11
I'm pretty sure I can do this by VB code, but I'd rather do it by query if its possible. Any ideas?
Thanks.
I'm having difficulty constructing a query for the following problem, anyone know how I can go about this...
I have a table which records events on particular objects, with 3 fields:
ObjectName
StartTime
EndTime
If the StartTime of an event falls within 10mins of the EndTime of another event on the same object I need to combine these two events into one, taking the StartTime of the 1st event and the EndTime of the second.
In practice this would result in starting with the following data:
Object1 10:00 10:23
Object1 11:41 13:57
Object2 12:07 12:45
Object2 12:48 13:17
Object2 18:33 19:11
etc.
Would result in the following output:
Object1 10:00 10:23
Object1 11:41 13:57
Object2 12:07 13:17 <= StartTime from 1st event, EndTime from 2nd
Object2 18:33 19:11
I'm pretty sure I can do this by VB code, but I'd rather do it by query if its possible. Any ideas?
Thanks.