Caused by: org.postgresql.util.PSQLException: ERROR: syntax error ator near "merge". - Mailing list pgsql-general

From Vinodh NV
Subject Caused by: org.postgresql.util.PSQLException: ERROR: syntax error ator near "merge".
Date
Msg-id CAMBHpRjk1OxbYDRw1-cs_8LyKJ23LrXuiitmqaVJLJBJ7ckKvw@mail.gmail.com
Whole thread Raw
Responses Re: Caused by: org.postgresql.util.PSQLException: ERROR: syntaxerror at or near "merge".
List pgsql-general
Sir,

I am facing the error Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near "merge". when I execute the below  query in postgres database. The same works fine in Oracle.

merge into net n using dual on (n.id=:id) when matched then update set Status=:status, lastStatusDate=:lastStatusDate, errorMessage=:errorMessage, errorDetails=:errorDetails when not matched then insert (id,Status, lastStatusDate, errorMessage, errorDetails) values (:id,:status,:lastStatusDate,:errorMessage,:errorDetails)";


Can you please let me know how to resolve it?

Thanks,
Vinodh.

pgsql-general by date:

Previous
From: Murtuza Zabuawala
Date:
Subject: Re: save query as sql file
Next
From: Alvaro Herrera
Date:
Subject: Re: Caused by: org.postgresql.util.PSQLException: ERROR: syntaxerror at or near "merge".