I'm trying to delete some conflicting date related to the times, this is a table of start times and stop times, and I want to write a query to delete overlapping data, in this case I would want to delete 13:00
row and 13:30
row(rows 6/7) because those times are already covered with the 12:00
to 14:00
row(rows 3/4). All the rows where VALUE_ENUM
are 1 are start times and all the rows where VALUE_ENUM
are 0 are stop times.
Here is an example of what the data in my table looks like:
SITE_ID ------- DEV_ID ------- SCHEDULE_TIME ------- VALUE_ENUM
---------------------------------------------------------------
1 3000 09:30:00 1
1 3000 11:30:00 0
1 3000 12:00:00 1
1 3000 14:00:00 0
1 3000 13:00:00 1
1 3000 13:30:00 0
1 3000 16:30:00 1
1 3000 18:30:00 0