Table A stores data in rows like
id, value1, value2
where id is always an even number. Table B stores this data in the form
id, value1
id-1, value2
or else
id, value1+value2
I need to do a once-off update of table B with the values taken from table A. Are there any elegant ways of doing this?
Clarification :
To answer Nate C-K's question below (which gets to the heart of the matter), the only way of knowing which arrangement applies to a record from table A is by inspecting the values(of id) in table B. This is why the problem is messy.