We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 54cbe6e + 93d704a commit a2e71fcCopy full SHA for a2e71fc
src/main/java/sqldump/etl/Query.java
@@ -57,8 +57,15 @@ public Boolean getDataFromSQLFile(String sqlFile, String outFile) {
57
sb.append(System.lineSeparator());
58
line = br.readLine();
59
}
60
- String query = sb.toString().replace(";","");
61
br.close();
+
62
+ // Removing semi-colon from end of query (if any)
63
+ // Oracle driver will throw exception if it find ; in end
64
+ String query = sb.toString().trim();
65
+ if(query.endsWith(";")) {
66
+ query = query.substring(0, query.length() - 1);
67
+ }
68
69
return executeQuery(query, outFile);
70
} catch (FileNotFoundException e) {
71
log.error("failed to load file. error: ");
0 commit comments