wrap dates

This commit is contained in:
Paul Trowbridge 2022-10-25 17:49:26 +00:00
parent cf5abeddbe
commit 0615163fad

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.34"; msg = "jrunner version 0.35";
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";
@ -228,28 +228,31 @@ public class jrunner {
nc = "'" + nc + "'"; nc = "'" + nc + "'";
break; break;
case "DATE": case "DATE":
nc = "'" + rs.getString(i) + "'"; nc = rs.getString(i);
if (rs.wasNull() || nc == null) { if (rs.wasNull() || nc == null) {
nc = "NULL"; nc = "NULL";
break; break;
} }
nc = "'" + nc + "'";
if (nc == "'1/1/0001 12:00:00 AM'") { if (nc == "'1/1/0001 12:00:00 AM'") {
nc = "NULL"; nc = "NULL";
} }
break; break;
case "TIME": case "TIME":
nc = "'" + rs.getString(i).replace("'","''") + "'"; nc = rs.getString(i).replace("'","''");
if (rs.wasNull() || nc == null) { if (rs.wasNull() || nc == null) {
nc = "NULL"; nc = "NULL";
break; break;
} }
nc = "'" + nc + "'";
break; break;
case "TIMESTAMP": case "TIMESTAMP":
nc = "'" + rs.getString(i).replace("'","''") + "'"; nc = rs.getString(i).replace("'","''");
if (rs.wasNull() || nc == null) { if (rs.wasNull() || nc == null) {
nc = "NULL"; nc = "NULL";
break; break;
} }
nc = "'" + nc + "'";
break; break;
case "BIGINT": case "BIGINT":
nc = rs.getString(i); nc = rs.getString(i);