a merge statement must be terminated by a semi-colon

[expired user #9700]'s profile image [expired user #9700] posted 8 years ago in General Permalink

Hi, I'm getting this error no matter what:

SQL Error (10713): A MERGE statement must be terminated by a semi-colon (;). The same exact statement works in a different client.

Here is the query:

MERGE Links AS target 
USING (SELECT @Url,@Title,@Description,@Tags) AS source (Url,Title,Description,Tags) 
ON (target.Url = source.Url) 
WHEN MATCHED THEN 
    UPDATE SET Title=@Title, Description = @Description, Tags = @Tags, Modified = GETDATE() 
WHEN NOT MATCHED 
    THEN INSERT (Title,Description,Url,Tags) VALUES (@Title,@Description,@Url,@Tags) OUTPUT inserted.Id;

Heidi SQL version 9.3.0.4984

ansgar's profile image ansgar posted 8 years ago Permalink

Is that code from a trigger or procedure, or just an ordinary query you are firing in HeidiSQL's query tab? Which Server is it - MySQL, MSSQL or PostgreSQL?

Please login to leave a reply, or register at first.