public int correctOracleCharSize(String sourceType,int sizeReported,int sizeDevisor){
  int i=sizeReported;
  String columnType=sourceType.toUpperCase();
  if (sizeDevisor > 1 && columnType.contains("CHAR")) {
    if (columnType.startsWith("NCHAR")) {
      i=sizeReported / sizeDevisor;
      if (sizeReported >= 2000)       i=sizeReported / 2;
    }
 else     if (columnType.startsWith("NVARCHAR")) {
      i=sizeReported / sizeDevisor;
      if (sizeReported >= 4000)       i=sizeReported / 2;
    }
  }
  return i;
}

public int correctOracleCharSize ( String sourceType , int sizeReported , int sizeDevisor ) { int i = sizeReported ; String columnType = sourceType . toUpperCase ( ) ; if ( sizeDevisor > 1 && columnType . contains ( "CHAR" ) ) { if ( columnType . startsWith ( "NCHAR" ) ) { i = sizeReported / sizeDevisor ; if ( sizeReported >= 2000 ) i = sizeReported / 2 ; } else if ( columnType . startsWith ( "NVARCHAR" ) ) { i = sizeReported / sizeDevisor ; if ( sizeReported >= 4000 ) i = sizeReported / 2 ; } } return i ; }
corrects buggy oracle jdbc size of nchar columns
