I need to do an update query that will update rows in a table based on a row in the table that was collected immediately prior to it.
So for example, say I have 4 rows. I have delimited them by | for ease of reading.
Row a: A|10:52|99
Row b: B|9:49|66
Row c: C|8:50|0
Row d: D|8:32|26
I need to update A based on B's value, B based on D's value (since c was 0) and leave d as it is since there is no earlier value.
TIA
So for example, say I have 4 rows. I have delimited them by | for ease of reading.
Row a: A|10:52|99
Row b: B|9:49|66
Row c: C|8:50|0
Row d: D|8:32|26
I need to update A based on B's value, B based on D's value (since c was 0) and leave d as it is since there is no earlier value.
TIA