执行此SQL脚本时出现以下错误:
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
关键字“WHERE”附近的语法不正确。
我看不出哪里出错了!