我不知道爲什麼一直返回:SQL更新與連接不工作我在這裏失蹤什麼?
#1064 - 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 'FROM vendas LEFT JOIN clientes c ON c.id = vendas.idCliente AND c.idRespons' at line 2
MySQL查詢:
UPDATE vendas
FROM vendas
LEFT JOIN clientes c ON c.id = vendas.idCliente AND c.idResponsavel IS NOT NULL
LEFT JOIN funcionarios f ON f.id = c.idResponsavel
SET vendas.idVendedorResponsavel = f.id
WHERE vendas.idVendedorAtendente is NULL
謝謝!有效。 – 2014-10-17 08:34:37
很高興聽到 – Pantamtuy 2014-10-17 08:36:19