不知道爲什麼它在t2拋出一個錯誤。我試圖運行一個簡單的SQL查詢。 運行於MS-SQL和錯誤消息說,「近T2不正確的語法」左加入子查詢
UPDATE t1
SET t1.EmpSubCompetency = t2.EmpSubCompetency,
t1.Competency = t2.Competency,
t1.FileName = t2.FileName,
t1.Longitude = t2.Longitude,
t1.Latitude = t2.Latitude,
t1.SubAreaName = t2.Region,
t1.SectorTag=t2.SectorTagClassification
FROM dbo.STG_MyCompetencies t1
LEFT JOIN (select * from dbo.STG_EmployeeMaster where Act_Flg='Y') t2
如果它引發錯誤,爲什麼不在錯誤信息中包含問題? – HoneyBadger
'ON'子句缺失 –
另外,您正在使用哪些DBMS? MySQL的? SQL Server?甲骨文? –