hi every one
here i need to set display_volume to be null with in whole hour intervals where rule2 apllied in hour
in below example only three intervals
07:20,07:25,07:30 is null i need to set from 07:00 ,07:10,07:15.....,07:55 as null for whole hour intervals
CREATE TABLE C2.TMP_DATA_MINS
(
DAYASDATE DATE,
HOURASNUMBER VARCHAR2(10 BYTE),
COSIT INTEGER,
LANEDIRECTION INTEGER,
RAW_VOLUME NUMBER,
DISPLAY_VOLUME NUMBER,
RULE_APPLIED VARCHAR2(200 BYTE)
)
sample data
DAYASDATE | HOURASNUMBER | COSIT | LANEDIRECTION | RAW_VOLUME | DISPLAY_VOLUME | RULE_APPLIED | ||||||
12/25/2013 07:00:00 | 07 | 42 | 1 | 54 | 54 | |||||||
12/25/2013 07:05:00 | 07 | 42 | 1 | 58 | 58 | |||||||
12/25/2013 07:10:00 | 07 | 42 | 1 | 49 | 49 | |||||||
12/25/2013 07:15:00 | 07 | 42 | 1 | 53 | 53 | |||||||
12/25/2013 07:20:00 | 7 | 42 | 1 | Rule 2 : Three consecutive time intervals are missing with in the period | ||||||||
12/25/2013 07:25:00 | 7 | 42 | 1 | Rule 2 : Three consecutive time intervals are missing with in the period | ||||||||
12/25/2013 07:30:00 | 7 | 42 | 1 | Rule 2 : Three consecutive time intervals are missing with in the period | ||||||||
12/25/2013 07:35:00 | 07 | 42 | 1 | 54 | 54 | |||||||
12/25/2013 07:40:00 | 07 | 42 | 1 | 50 | 50 | |||||||
12/25/2013 07:45:00 | 07 | 42 | 1 | 41 | 41 | |||||||
12/25/2013 07:50:00 | 07 | 42 | 1 | 36 | 36 | |||||||
12/25/2013 07:55:00 | 07 | 42 | 1 | 37 | 37 |
|
i need to set display volume to be set null for whole hour intervals
o/p something like
DAYASDATE | HOURASNUMBER | COSIT | LANEDIRECTION | RAW_VOLUME | DISPLAY_VOLUME | RULE_APPLIED | ||||||
12/25/2013 07:00:00 | 07 | 42 | 1 | 54 | Rule 2 : Three consecutive time intervals are missing with in the period | |||||||
12/25/2013 07:05:00 | 07 | 42 | 1 | 58 | Rule 2 : Three consecutive time intervals are missing with in the period | |||||||
12/25/2013 07:10:00 | 07 | 42 | 1 | 49 | Rule 2 : Three consecutive time intervals are missing with in the period | |||||||
12/25/2013 07:15:00 | 07 | 42 | 1 | 53 | Rule 2 : Three consecutive time intervals are missing with in the period | |||||||
12/25/2013 07:20:00 | 7 | 42 | 1 | Rule 2 : Three consecutive time intervals are missing with in the period | ||||||||
12/25/2013 07:25:00 | 7 | 42 | 1 | Rule 2 : Three consecutive time intervals are missing with in the period | ||||||||
12/25/2013 07:30:00 | 7 | 42 | 1 | Rule 2 : Three consecutive time intervals are missing with in the period | ||||||||
12/25/2013 07:35:00 | 0 7 | 42 | 1 | 54 | Rule 2 : Three consecutive time intervals are missing with in the period | |||||||
12/25/2013 07:40:00 | 07 | 42 | 1 | 50 | Rule 2 : Three consecutive time intervals are missing with in the period | |||||||
12/25/2013 07:45:00 | 07 | 42 | 1 | 41 | Rule 2 : Three consecutive time intervals are missing with in the period | |||||||
12/25/2013 07:50:00 | 07 | 42 | 1 | 36 | Rule 2 : Three consecutive time intervals are missing with in the period | |||||||
12/25/2013 07:55:00 | 07 | 42 | 1 | 37 | Rule 2 : Three consecutive time intervals are missing with in the period |