Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
Following this mails exchange, i build this JIRA about SQL Merge.
Using SQLMerge on this unit test SqlMergeTest.java i tried to generate SQL Merge SQL code.
this generate
MERGE INTO "OUT_TABLE" AS "Target" USING "IN_TABLE" AS "Source" ON "TARGET"."ID" = "SOURCE"."IDENT" WHEN MATCHED THEN UPDATE SET "TARGET"."FIELD1" = "SOURCE"."F1", "TARGET"."FIELD2" = "SOURCE"."F2" WHEN NOT MATCHED THEN INSERT ("TARGET"."ID", "TARGET"."FIELD1", "TARGET"."FIELD2") (VALUES ("SOURCE"."IDENT", "SOURCE"."F1", "SOURCE"."F2"))
that doesn't work because of the bracket before VALUES on last line.
just removing brackets
WHEN NOT MATCHED THEN INSERT ("TARGET"."ID", "TARGET"."FIELD1", "TARGET"."FIELD2") VALUES ("SOURCE"."IDENT", "SOURCE"."F1", "SOURCE"."F2")
make the query work.
Attachments
Issue Links
- links to