Please help.
I am working on a database that logs the alarm events from a machine. The problem I have is that I need to explain why the machine has stopped and calculate the time it stops for. I then report the total time stopped.
This is fine when only 1 alarm was present as the raw table only has 1 relevant entry at that time. But if there were two alarms then I get two entries at that time. I only need one of the entries at that time, It doesn't matter which one.
I have a query that runs and shows only the alarms so I can see the duplicates but I'd like to remove any duplicates based only on the time column.
The table/query.
Event, EventTimeUTC, Event Value.
I want to show all of these but only the first occurance by event time EventTime.
I have tried everything I can think of but I always return all rows.
Below is an example of where I need this to work. I only want to see one alarm here it doesn't matter which.
Event EventTimeUTC Value
Flags (00-15) 28/02/2008 20:38:41 524288
Flags (96-111) 28/02/2008 20:38:41 536870912
I cannot alter the original table and would prefer to have just a simple query showing the first occurence by time.
I hope someone can help, I have spent hours surfing the net for an answer.
Regards
Kris Bishop
I am working on a database that logs the alarm events from a machine. The problem I have is that I need to explain why the machine has stopped and calculate the time it stops for. I then report the total time stopped.
This is fine when only 1 alarm was present as the raw table only has 1 relevant entry at that time. But if there were two alarms then I get two entries at that time. I only need one of the entries at that time, It doesn't matter which one.
I have a query that runs and shows only the alarms so I can see the duplicates but I'd like to remove any duplicates based only on the time column.
The table/query.
Event, EventTimeUTC, Event Value.
I want to show all of these but only the first occurance by event time EventTime.
I have tried everything I can think of but I always return all rows.
Below is an example of where I need this to work. I only want to see one alarm here it doesn't matter which.
Event EventTimeUTC Value
Flags (00-15) 28/02/2008 20:38:41 524288
Flags (96-111) 28/02/2008 20:38:41 536870912
I cannot alter the original table and would prefer to have just a simple query showing the first occurence by time.
I hope someone can help, I have spent hours surfing the net for an answer.
Regards
Kris Bishop
Comment