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 query:
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.