convert type to upper case and handle TEXT data type

This commit is contained in:
Paul Trowbridge 2023-02-01 09:04:10 -05:00
parent b816399cba
commit 24fad6aa04

View File

@ -38,7 +38,7 @@ public class jrunner {
Timestamp tsStart = null;
Timestamp tsEnd = null;
msg = "jrunner version 0.39";
msg = "jrunner version 0.40";
msg = msg + nl + "-scu source jdbc url";
msg = msg + nl + "-scn source username";
msg = msg + nl + "-scp source passowrd";
@ -206,7 +206,7 @@ public class jrunner {
t++;
nr = "";
for (int i = 1; i <= cols; i++){
switch (dtn[i]){
switch (dtn[i].toUpperCase()){
case "VARCHAR":
nc = rs.getString(i);
if (rs.wasNull() || nc == null) {
@ -217,6 +217,16 @@ public class jrunner {
if (trim) { nc = nc.trim();}
nc = "'" + nc + "'";
break;
case "TEXT":
nc = rs.getString(i);
if (rs.wasNull() || nc == null) {
nc = "NULL";
break;
}
nc = nc.replaceAll("'","''");
if (trim) { nc = nc.trim();}
nc = "'" + nc + "'";
break;
case "CHAR":
nc = rs.getString(i);
if (rs.wasNull() || nc == null) {