I am attempting to update a table column with values from another table + a little arithmetic. I am no expert but reading a few questions seems like I have to use JOIN on the COMMON column to select data from both tables.
UPDATE Farming SET Farming.GoldLabor = Farming.GoldPerUnit / (DataTable.LaborYieldA +
DataTable.LaborYieldB)
FROM Farming f INNER JOIN DataTable d ON f.name = d.name;
Error is:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near 'FROM Farming f INNER JOIN
DataTable d ON f.name = d.name' at line 1
I am using code from a few other questions answered here.
https://stackoverflow.com/a/707383
https://stackoverflow.com/a/1746161
I am using mySQL from 1&1 Hosting, and I attempted to use JOIN & INNER JOIN.
Thanks for your time.