>I have a cust.dbf and an orders.dbf. The key of cust.dbf is custkey. The key of orders.dbf is custkey, orderseq. There is region field that is on both tables (I know, bad design), that has gotten out of sync between the customer and order tables. I want to find and replace the orders.region with the cust.region where cust.custkey = orders.custkey and cust.region != orders.region.
UPDATE orders SET region = cust.region;
FROM orders;
INNER JOIN cust ON cust.custkey = orders.custkey and cust.region != orders.region
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.