I'm running into an issue with the SQL UPDATE command. I have two tables, Customer and Customer2. The Customer table contains all customer information. The Customer2 table contains customers who have outstanding invoices. What I am trying to do is update Customer2 table with the area code from the Customer table. The matching parts of the two tables is the column CUS_CODE.
Here's what I have so far:
UPDATE Customer2
SET Customer2.cus_areacode = Customer.cus_areacode
FROM Customer2
INNER JOIN Customer
ON (customer.cus_code = customer2.cus_code)
WHERE customer.cus_code = customer2.cus_code;
I'm getting a Syntax error starting at 'From Customer2'. I've been racking my brain trying to get this working, any help would be appreciated. I'm performing this task using SQL inside MS Access.