clean up replacements

This commit is contained in:
Paul Trowbridge 2022-10-27 06:58:18 -04:00
parent efd922b2e0
commit c7884f3605
1 changed files with 15 additions and 15 deletions

View File

@ -35,7 +35,7 @@ public class jrunner {
Integer cols = null; Integer cols = null;
String[] dtn = null; String[] dtn = null;
msg = "jrunner version 0.36"; msg = "jrunner version 0.37";
msg = msg + nl + "-scu source jdbc url"; msg = msg + nl + "-scu source jdbc url";
msg = msg + nl + "-scn source username"; msg = msg + nl + "-scn source username";
msg = msg + nl + "-scp source passowrd"; msg = msg + nl + "-scp source passowrd";
@ -207,17 +207,7 @@ public class jrunner {
nc = "NULL"; nc = "NULL";
break; break;
} }
nc.replace("'","''"); nc = nc.replaceAll("'","''");
if (trim) { nc = nc.trim();}
nc = "'" + nc + "'";
break;
case "CLOB":
nc = rs.getString(i);
if (rs.wasNull() || nc == null) {
nc = "NULL";
break;
}
nc.replace("'","''");
if (trim) { nc = nc.trim();} if (trim) { nc = nc.trim();}
nc = "'" + nc + "'"; nc = "'" + nc + "'";
break; break;
@ -227,7 +217,17 @@ public class jrunner {
nc = "NULL"; nc = "NULL";
break; break;
} }
nc.replace("'","''"); nc = nc.replaceAll("'","''");
if (trim) { nc = nc.trim();}
nc = "'" + nc + "'";
break;
case "CLOB":
nc = rs.getString(i);
if (rs.wasNull() || nc == null) {
nc = "NULL";
break;
}
nc = nc.replaceAll("'","''");
if (trim) { nc = nc.trim();} if (trim) { nc = nc.trim();}
nc = "'" + nc + "'"; nc = "'" + nc + "'";
break; break;
@ -248,7 +248,7 @@ public class jrunner {
nc = "NULL"; nc = "NULL";
break; break;
} }
nc.replace("'","''"); nc.replaceAll("'","''");
nc = "'" + nc + "'"; nc = "'" + nc + "'";
break; break;
case "TIMESTAMP": case "TIMESTAMP":
@ -257,7 +257,7 @@ public class jrunner {
nc = "NULL"; nc = "NULL";
break; break;
} }
nc.replace("'","''"); nc.replaceAll("'","''");
nc = "'" + nc + "'"; nc = "'" + nc + "'";
break; break;
case "BIGINT": case "BIGINT":