5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-04 01:19:38 +08:00

SQOOP-2990: Sqoop(oracle) export [updateTableToOracle] with "--update-mode allowinsert" : app fails with java.sql.SQLException: Missing IN or OUT parameter at index

(Sowmya Ramesh via Venkat Ranganathan)
This commit is contained in:
Venkat Ranganathan 2016-11-11 14:06:21 -08:00
parent 68f76982a0
commit 7d6667ddb6

View File

@ -71,7 +71,7 @@ protected String getUpdateStatement() {
// lookup table for update columns
Set<String> updateKeyLookup = new LinkedHashSet<String>();
for (String updateKey : updateCols) {
updateKeyLookup.add(updateKey);
updateKeyLookup.add('"' + updateKey + '"');
}
StringBuilder sb = new StringBuilder();
@ -85,7 +85,7 @@ protected String getUpdateStatement() {
} else {
sb.append(" AND ");
}
sb.append(updateCols[i]).append(" = ?");
sb.append('"' + updateCols[i] + '"').append(" = ?");
}
sb.append(" )");