Quantcast
Channel: Getting started with SQL Server forum
Viewing all articles
Browse latest Browse all 9243

please help

$
0
0

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

DAYASDATEHOURASNUMBER   COSITLANEDIRECTIONRAW_VOLUMEDISPLAY_VOLUMERULE_APPLIED
12/25/2013 07:00:00         074215454
12/25/2013 07:05:00         074215858
12/25/2013 07:10:00         074214949
12/25/2013 07:15:00         074215353
12/25/2013 07:20:00          7421Rule 2 : Three consecutive time intervals are missing with in the period
12/25/2013      07:25:00           7421Rule 2 : Three consecutive time intervals are missing with in the period
12/25/2013 07:30:007421Rule 2 : Three consecutive time intervals are missing with in the period
12/25/2013 07:35:00074215454
12/25/2013 07:40:00074215050
12/25/2013 07:45:00074214141
12/25/2013 07:50:00074213636
12/25/2013 07:55:00074213737

 

i need to set display volume to be set null for whole hour intervals

 

o/p something like

 

DAYASDATEHOURASNUMBERCOSITLANEDIRECTIONRAW_VOLUMEDISPLAY_VOLUMERULE_APPLIED
12/25/2013 07:00:00        0742154Rule 2 : Three consecutive time intervals are missing with in the period
12/25/2013 07:05:00         0742158Rule 2 : Three consecutive time intervals are missing with in the period
12/25/2013 07:10:00          0742149Rule 2 : Three consecutive time intervals are missing with in the period
12/25/2013 07:15:00           0742153Rule 2 : Three consecutive time intervals are missing with in the period
12/25/2013 07:20:00           7421Rule 2 : Three consecutive time intervals are missing with in the period
12/25/2013 07:25:00          7421Rule 2 : Three consecutive time intervals are missing with in the period
12/25/2013 07:30:00             7421Rule 2 : Three consecutive time intervals are missing with in the period
12/25/2013  07:35:00            0 742154Rule 2 : Three consecutive time intervals are missing with in the period
12/25/2013 07:40:00           0742150Rule 2 : Three consecutive time intervals are missing with in the period
12/25/2013 07:45:00           0742141Rule 2 : Three consecutive time intervals are missing with in the period
12/25/2013 07:50:00             0742136Rule 2 : Three consecutive time intervals are missing with in the period
12/25/2013 07:55:00             0742137

Rule 2 : Three consecutive time intervals are missing with in the period

 thanks in advance

Viewing all articles
Browse latest Browse all 9243

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>