Creating Data [message #495645] |
Mon, 21 February 2011 09:32 |
aarti81
Messages: 235 Registered: December 2007 Location: USA
|
Senior Member |
|
|
Hi All
I have the following table
ID_NBR DIRECTION START_DATE START_DAY END_DATE END_DAY TRAFFIC_SAMPLE_ID_1 BIN_DATA_ID END_INTV_TIME DATA1 DATA2 DATA3
97326013 3 100908 Thursday 101308 Monday 143560 138825 1400 3 541 182
97326013 3 100908 Thursday 101308 Monday 143560 138826 1500 1 562 196
97326013 3 100908 Thursday 101308 Monday 143560 138827 1600 2 573 208
97326013 3 100908 Thursday 101308 Monday 143560 138828 1700 5 574 181
97326013 3 100908 Thursday 101308 Monday 143560 138829 1800 1 576 209
97326013 3 100908 Thursday 101308 Monday 143560 138830 1900 0 539 162
97326013 3 100908 Thursday 101308 Monday 143560 138831 2000 2 451 123
97326013 3 100908 Thursday 101308 Monday 143560 138832 2100 1 401 128
97326013 3 100908 Thursday 101308 Monday 143560 138833 2200 0 310 118
97326013 3 100908 Thursday 101308 Monday 143560 138834 2300 4 234 65
97326013 3 100908 Thursday 101308 Monday 143560 138835 2400 2 149 61
97326013 3 100908 Thursday 101308 Monday 143560 138836 100 2 85 25
97326013 3 100908 Thursday 101308 Monday 143560 138837 200 2 55 35
97326013 3 100908 Thursday 101308 Monday 143560 138838 300 2 44 16
97326013 3 100908 Thursday 101308 Monday 143560 138839 400 1 69 22
97326013 3 100908 Thursday 101308 Monday 143560 138840 500 3 131 51
97326013 3 100908 Thursday 101308 Monday 143560 138841 600 7 283 170
97326013 3 100908 Thursday 101308 Monday 143560 138842 700 5 575 255
97326013 3 100908 Thursday 101308 Monday 143560 138843 800 9 896 296
In the above table the END_INTV_TIME column is having only 19 records instead of 24 (each record relates to each hour of the day) and in the above table i have only till END_INTV_TIME . Is there any way where i can add the reamining 5 records with END_INTV_TIME as 900,1000,1100,1200,1300 and assign the DATA1,DATA2,DATA3 columns ZERO values? In this case there are only 5 records missing , in some cases there are only 2 records so i'm looking for a generalised solutuon where i can add the missing records based on 24 hour period.
Thanks
|
|
|
Re: Creating Data [message #495658 is a reply to message #495645] |
Mon, 21 February 2011 13:04 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Choose one of row generator techniques to create the full set, which MINUS your current data set returns records that are missing.
Or, generated records INTERSECTed with current ones return the whole set.
Choose the way you find the most useful.
|
|
|