trim end only

This commit is contained in:
Paul Trowbridge 2018-08-23 16:52:30 -04:00
parent 80cddb08bc
commit e42f7fcc6e

View File

@ -138,21 +138,19 @@ namespace test
switch (dtn[i]){
case "VARCHAR":
if (trim) {
nc = "'" + getv[i].ToString().Replace("'","''").Trim() + "'";
nc = "'" + getv[i].ToString().Replace("'","''").TrimEnd() + "'";
}
else {
nc = "'" + getv[i].ToString().Replace("'","''") + "'";
}
nc = "'" + getv[i].ToString().Replace("'","''") + "'";
break;
case "CHAR":
if (trim) {
nc = "'" + getv[i].ToString().Replace("'","''").Trim() + "'";
nc = "'" + getv[i].ToString().Replace("'","''").TrimEnd() + "'";
}
else {
nc = "'" + getv[i].ToString().Replace("'","''") + "'";
}
nc = "'" + getv[i].ToString().Replace("'","''") + "'";
break;
case "DATE":
if (getv[i].ToString() == "1/1/0001 12:00:00 AM" || getv[i].ToString() == "") {