3
執行此SQL腳本時,我收到以下錯誤:SQL Server的MERGE語句 - 語法錯誤
MERGE TridionCentres TridionCentres
USING (SELECT * FROM #CentresToUpdate) NewInfo
ON (TridionCentres.[publication id] = NewInfo.[publication id] AND
TridionCentres.centre_number = NewInfo.centre_number)
WHERE matched THEN
UPDATE
SET TridionCentres.centre = NewInfo.centre,
TridionCentres.[date] = NewInfo.[date];
錯誤:
Msg 156, Level 15, State 1, Line 5
Incorrect syntax near the keyword 'WHERE'.
我不能看到我已經錯了!
該關鍵字是時,而不是在哪裏:) http://technet.microsoft.com/en-us/library/bb510625.aspx – fnurglewitz
@ tr3您應該添加您的評論作爲答案。 (並可能發佈固定查詢) – Lamak
爲什麼這麼多人發表他們的答案作爲評論? – 2012-11-14 14:33:54