Greetings All,
I am trying to develop a means of "filling" in missing data from a table, and would like some guidance as to the best approach to take. I have thought of a few differing approaches, and do not know how to implement or which method is most effective for the data structured as follows:
Data Looks like (2 fields)
DATE // AMOUNT
06/01/2009 // 1.25
06/02/2009 // 1.23
06/03/2009 // 1.17
06/06/2009 // 1.05
etc
What I need to develop is a means of creating records for the "missing" dates with the value from the last date on file (create records for June 4th & June 5th with a value of 1.17 in this example).
I was thinking that if I had a table with all dates linked via an Outer Join to my data I can get null/empty Amount values for the "missing" dates and was considering something structured as follows (pseudo-code):
I have not worked much with loops, nor have I had to "create" data which is not in the Database and would appreciate any insight as to how to proceed.
Thanks in advance,
Mike
___________________________
There Are 10 Types of People,
Those Who Can Read Binary...
And Those Who Can't.
I am trying to develop a means of "filling" in missing data from a table, and would like some guidance as to the best approach to take. I have thought of a few differing approaches, and do not know how to implement or which method is most effective for the data structured as follows:
Data Looks like (2 fields)
DATE // AMOUNT
06/01/2009 // 1.25
06/02/2009 // 1.23
06/03/2009 // 1.17
06/06/2009 // 1.05
etc
What I need to develop is a means of creating records for the "missing" dates with the value from the last date on file (create records for June 4th & June 5th with a value of 1.17 in this example).
I was thinking that if I had a table with all dates linked via an Outer Join to my data I can get null/empty Amount values for the "missing" dates and was considering something structured as follows (pseudo-code):
Code:
Do Until EoF
Variable varAmount as Double
If table.Amount <> "" then
varAmount=table.Amount
ELSE
Do Until table.Amount <> ""
~fill varAmount into Amount field~
Next Record
Loop
Next record
Loop
Thanks in advance,
Mike
___________________________
There Are 10 Types of People,
Those Who Can Read Binary...
And Those Who Can't.