I have a quote_item table where each item has the following fields: name, product_id, r_code1, r_code2
Product table also has r_code1 and r_code2
That data is in two locations because the user wanted quotes to be a snapshot, if they change r_code1 later at the product level it shouldn't impact quotes automatically.
However I've now been asked to reflect r_code changes to existing quotes since there was a mistake.
If I have a quote with 20 quote_items, how would I write a query that updates each quote_item.rcode_1 to the corresponding product.rcode_1. The link is through quote_item.product_id = product.id.
Thanks in advance Nick