Search code examples
mysqlsql-updateinner-join

INNER JOIN UPDATE hanging on sending data


Trying to update one table from a column in another table based on two conditions. I've tried many version of this but this is what I'm currently trying and it just hangs. When I check the table while running, I'm not seeing any updating occurring. Is there something wrong with my syntax? Thanks!

UPDATE earningsdates e
INNER JOIN actualmove a 
ON e.ticker = a.theticker AND e.exactearningsdate = a.realearningsdate
SET e.theamove = a.themove;

Solution

  • I made ticker and theticker non-unique indexes and the query worked without a problem.