I'm attempting to update a table using another table in SQL Developer. The data structure looks like this:
Table_to_be_updtated
Shipment pkg_type.
1395 1
1395 1
1395 1
2233 2
5466 3
Table_with_update_info
Shipment pkg_type.
1395 3
1395 3
1395 3
2233 1
5466 2
This is my updater query
UPDATE d
SET d.pkg_type = bd.pkg_type
FROM Table_to_be_updtated.Shipment d
JOIN Table_with_update_info.Shipment bd
ON bd.Shipment = d.Shipment;
This is only my most recent attempt. I've tried may other versions of doing the update query and no success. I hope someone can help me.
Thank you