Please support Oracle style MERGE statement, at least when in Oracle
compatibility mode.
For example, given table like:
CREATE TABLE "MERCHANT"
(
MID varchar2(128) PRIMARY KEY NOT NULL,
LNET varchar2(10) NOT NULL,
FIID varchar2(16),
SIC_CDE varchar2(10),
NAME varchar2(256),
OPENDATE date,
ZIPCODE varchar2(10),
CITY varchar2(32)
);
I would like to be able to execute following sql (please note that it's
pseudocode with placeholders):
MERGE INTO MERCHANT USING dual ON (MID=:mid)
WHEN MATCHED THEN
UPDATE SET LNET=:lnet,
FIID=:fiid,SIC_CDE=:siccde,NAME=:name,OPENDATE=:opndate,ZIPCODE=:zipcode,CITY=:c
ity
WHEN NOT MATCHED THEN INSERT (MID,LNET,FIID,SIC_CDE,NAME,OPENDATE,ZIPCODE,CITY)
VALUES (:mid, :lnet, :fiid, :siccde, :name, :opndate, :zipcode, :city)
Oracle documentation:
http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_9016.htm#SQLRF0
1606
Thanks!
Original issue reported on code.google.com by ivica.lo...@gmail.com on 11 Feb 2013 at 4:27
Original issue reported on code.google.com by
ivica.lo...@gmail.com
on 11 Feb 2013 at 4:27