Dear List,
 
Could I get an explanation why 1 fails, but 2 works.
 
1.
 
Update statement preceded with explain, fails:
 
explain update COMPANY_NUMBERS_tmp_Mikhail c join tmp_HEMSCOTT_MKTVALUES
t on c.ticker = t.TickerSymbol and t.InterimEndingDate =
replace(left(c.date_qtr,7),'-','/') set
c.total_shares_outstanding_market_cap = t.MarketValue;
ERROR 1064 (42000): 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 'update COMPANY_NUMBERS_tmp_Mikhail c join
tmp_HEMSCOTT_MKTVALUES t on c.ticker =' at line 1
 
2.
 
Actual execution of the update statement goes through, no problem
 
mysql> update COMPANY_NUMBERS_tmp_Mikhail c join tmp_HEMSCOTT_MKTVALUES
t on c.ticker = t.TickerSymbol and t.InterimEndingDate =
replace(left(c.date_qtr,7),'-','/') 
set c.total_shares_outstanding_market_cap = t.MarketValue;
Query OK, 157551 rows affected (4 min 22.81 sec)
Rows matched: 162999  Changed: 157551  Warnings: 0

Regards,
 
Mikhail Berman
 

Reply via email to