I have no idea what the problem is. Using MySQL 5.0 i get a compile error when attempting to run the following MYSQL update statement
UPDATE b
SET b.mapx = g.latitude,
b.mapy = g.longitude
FROM business AS b
INNER JOIN business_geocode g ON b.business_id = g.business_id
WHERE (b.mapx = '' or b.mapx = 0) and
g.latitude > 0
all the field names are correct. Any thoughts?
Try this:
Update:
Since you said the query yielded a syntax error, I created some tables that I could test it against and confirmed that there is no syntax error in my query:
See? No syntax error. I tested against MySQL 5.5.8.
For MySql WorkBench, Please use below :
The
SET
clause should come after the table specification.