This is an automated email from the ASF dual-hosted git repository.
doebele pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/empire-db.git
The following commit(s) were added to refs/heads/master by this push:
new 550c274f EMPIREDB-418 Oracle Handler MERGE INTO fix
550c274f is described below
commit 550c274f50f031e59494b4ae468201388592b3ff
Author: Rainer Döbele <[email protected]>
AuthorDate: Mon Mar 25 17:28:13 2024 +0100
EMPIREDB-418
Oracle Handler MERGE INTO fix
---
.../main/java/org/apache/empire/dbms/oracle/DBCommandOracle.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
a/empire-db/src/main/java/org/apache/empire/dbms/oracle/DBCommandOracle.java
b/empire-db/src/main/java/org/apache/empire/dbms/oracle/DBCommandOracle.java
index a206bcae..563acb30 100644
--- a/empire-db/src/main/java/org/apache/empire/dbms/oracle/DBCommandOracle.java
+++ b/empire-db/src/main/java/org/apache/empire/dbms/oracle/DBCommandOracle.java
@@ -331,9 +331,13 @@ public class DBCommandOracle extends DBCommand
// Add Grouping
addGrouping(sql);
// on
+ int count = 0;
sql.append(") q0\r\nON (");
for (DBColumn col : keyColumns)
- { // compare
+ {
+ if (count++>0)
+ sql.append(" AND ");
+ // add constraint
sql.append(" q0.");
col.addSQL(sql, CTX_NAME);
sql.append("=");