我有一个关于根据 2 个表匹配的字段将值设置为是或否的先前问题。我试图让查询检查generalsource.firstinventor,如果它匹配inventor.inventorfull插入“是”或插入“否”结果是以下代码:
UPDATE i
SET LeadInventor =
CASE
WHEN fi.FirstInventorName IS NULL THEN 'No'
ELSE 'Yes'
END
FROM Inventor i
LEFT JOIN FirstInventor fi
ON i.InventorFirst + ' ' + i.InventorLast = fi.FirstInventorName
效果非常好,直到我尝试放入 MySQL 并且我无法弄清楚语法有什么问题。我如何解决它?
Error Code: 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 Inventor i LEFT JOIN FirstInventor fi ON i.InventorFirst + ' ' + i.' at line 7