filling in for missing records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have records that contain pieces of data along with the time (in hours) it
was recorded. the time interval that accompanies my data is not consistant.

I would like to be able to write a query that "fills in the gaps" of the
time intervals. It would list all hours within my timeframe (that part I can
do), but also it would return data from the closest hour if there is no data
for that hour in my records (the closest hour less than the one it's
evaluating that is).

The second part has me stumped. Any help?

Thanks,
Lou Sanderson
 
Example: I may have a record that has a value of 5 at time 20 and the next
record may have a value of 17 at time 83, and value of 36 for time 90, and so
on.

I would want the query to have a record for every hour up to a set point and
the value for hours 20-82 would be 5, the value for hours 83-89 would be 17,
then 36 on until the next time ...
 
Back
Top