LEFT联接表错误的MYSQL别名

时间:2017-09-11 02:30:11

标签: mysql

无法使用别名找到在LEFT联接上声明的表。这是我的疑问:

    "INSERT INTO currentweekvalue (symbol,value)
                        SELECT * FROM(SELECT cwv.symbol AS csymbol, (cwv.value + di.value) AS totval
                            FROM currentweekvalue  AS cwv
                            LEFT JOIN $dayiterated  AS di
                            ON cwv.symbol = di.symbol) cmbtbl
                        WHERE cmbtbl.csymbol =  cmbtbl.di.symbol
                        ON DUPLICATE KEY UPDATE value = VALUES(cmbtbl.totval)"; 

我遇到过未知栏&cmbtbl.di.symbol'在' where子句'。如何解决这个问题呢。感谢

0 个答案:

没有答案