Ok, this is that new post I said I was going to make.
Synopsis of situation:
I have two tables that have measurement slices. One table contains the time slices, the other contains the measurements.
My cumulative BTU table has the following structure:
Now, what I'm trying to do is to step through the existing measurements in ewise_slice/_msmnt tables and thereby calculate my existing readings. I have a SP that will work but what I need to know is how to loop through my existing readings. I will keep working on this but any advice is appreciated :)
Synopsis of situation:
I have two tables that have measurement slices. One table contains the time slices, the other contains the measurements.
Code:
ewise_slice
|
> slice_id
> device_id
> slice_timestamp
ewise_slice_msmnt
|
> slice_msmnt_id
> slice_id
> msmnt_type_id
> msmnt_value
Code:
ewise_cumulative_btus
|
> id
> device_id
> curbtus
> cumul_btus
> ewise_slice
Comment