Tricky! Event log - show eventID and the next 5 minutes

Roy riggsjø

Registered User.
Local time
Today, 05:03
Joined
Apr 11, 2008
Messages
11
Hello.

Im working on a db that analyze a event log.
What i need is a query that output a certain eventID and the following 5 minutes of events.

for instance:
this sample list is the input.
the eventID that im looking for is "Alarm 1"

eventID date time

Alarm 1 12.01.2008 12:01:00
Alarm 2 13.01.2008 12:02:00
Alarm 3 14.01.2008 12:03:00
Alarm 4 15.01.2008 12:03:00
Alarm 5 16.01.2008 12:04:00
Alarm 6 17.01.2008 12:04:00
Alarm 7 18.01.2008 12:07:00
Alarm 8 19.01.2008 12:08:00
Alarm 1 20.01.2008 12:09:00
Alarm 10 21.01.2008 12:10:00
Alarm 11 22.01.2008 12:11:00
Alarm 12 23.01.2008 12:12:00
Alarm 13 24.01.2008 12:13:00
Alarm 14 25.01.2008 12:14:00
Alarm 15 26.01.2008 12:15:00
Alarm 16 27.01.2008 12:16:00

I want the results of the query to be:

eventID date time

Alarm 1 12.01.2008 12:01:00
Alarm 2 13.01.2008 12:02:00
Alarm 3 14.01.2008 12:03:00
Alarm 4 15.01.2008 12:03:00
Alarm 5 16.01.2008 12:04:00
Alarm 6 17.01.2008 12:04:00
Alarm 1 20.01.2008 12:09:00
Alarm 10 21.01.2008 12:10:00
Alarm 11 22.01.2008 12:11:00
Alarm 12 23.01.2008 12:12:00
Alarm 13 24.01.2008 12:13:00
Alarm 14 25.01.2008 12:14:00

Cant find a easy way to do this. have tried to make a VBA code, but it is not that fast. The orginal event log have about 200'000 events.

I am grateful for all help!!

Thank You!

- Roy
 
Hi Roy,
Create a normal select query and in the criteria, place the following >=[Alarm1Time] And <(DateAdd("n",6,[Alarm1Time]))

Hope this helps

Q:)
 
Thats should have read in the criterian for time

Doh


Q :)
 

Users who are viewing this thread

Back
Top Bottom