Forums
This topic is locked
sql language to remove repeat data within specific timeline
Posted 14 May 2009 13:14:20
1
has voted
14 May 2009 13:14:20 Glen Hynes posted:
hey all..im new enough with sql language and need help with a query that i am trying to show..
i pull alarm data from a database and it gives me all the alarms that occur with the following columns..
Tool time_occured alarmtext
When I run the query say it gives me 5 alarms….
Tool time_occured alarmtext
#1 12:20 DOOR OPEN
#1 12:21 DOOR OPEN
#1 12:30 DOOR OPEN
#2 12:20 DOOR OPEN
#2 12:24 DOOR OPEN
What I need is the table to show the following…
Tool time_occured alarmtext
#1 12:20 DOOR OPEN
#1 12:30 DOOR OPEN
#2 12:20 DOOR OPEN
I want to show alarms for tools… but not show an alarm if the same alarm occurs within 5 minutes of the first alarm of that type on the unique tool…
Is this doable??