OK, next question.
I have one table that contains all possible data.
And another table that under perfect conditions should contain exactly the same data and number of rows, with the only difference being the myFactor column values.
There are 48 periods per day.
The structure of both tables is as such:
myDate myPeriod myCode myFactor
2006-03-01 1 AAA 1.56
...
2006-03-01 48 AAA 1.34
Under imperfect conditions (which happens quite regularily) the second table may contain some NULL values in the myFactor column and some dates may be missing
What I need to be able to do is build up the second table with values from the first table whenever a NULL values is encountered or a date is missing.
So the second table should end up with exactly the same number of rows as the first and contain no NULL values in the myFactor column.
I have one table that contains all possible data.
And another table that under perfect conditions should contain exactly the same data and number of rows, with the only difference being the myFactor column values.
There are 48 periods per day.
The structure of both tables is as such:
myDate myPeriod myCode myFactor
2006-03-01 1 AAA 1.56
...
2006-03-01 48 AAA 1.34
Under imperfect conditions (which happens quite regularily) the second table may contain some NULL values in the myFactor column and some dates may be missing
What I need to be able to do is build up the second table with values from the first table whenever a NULL values is encountered or a date is missing.
So the second table should end up with exactly the same number of rows as the first and contain no NULL values in the myFactor column.