odps-sqoop/src/java/org/apache/sqoop/mapreduce/SQLServerExportOutputFormat.java [61:109]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    protected String getInsertStatement(int numRows) {
      StringBuilder sb = new StringBuilder();

      sb.append("INSERT INTO " + getTableName() + " ");

      int numSlots;
      String [] colNames = getColumnNames();
      if (colNames != null) {
        numSlots = colNames.length;

        sb.append("(");
        boolean first = true;
        for (String col : colNames) {
          if (!first) {
            sb.append(", ");
          }

          sb.append(col);
          first = false;
        }

        sb.append(") ");
      } else {
        numSlots = getColumnCount(); // set if columnNames is null.
      }

      // generates the (?, ?, ?...) used for each row.
      StringBuilder sbRow = new StringBuilder();
      sbRow.append("(SELECT ");
      for (int i = 0; i < numSlots; i++) {
        if (i != 0) {
          sbRow.append(", ");
        }

        sbRow.append("?");
      }
      sbRow.append(") ");

      // Now append that numRows times.
      for (int i = 0; i < numRows; i++) {
        if (i != 0) {
          sb.append("UNION ALL ");
        }

        sb.append(sbRow);
      }

      return sb.toString();
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



odps-sqoop/src/java/org/apache/sqoop/mapreduce/OracleExportOutputFormat.java [61:109]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    protected String getInsertStatement(int numRows) {
      StringBuilder sb = new StringBuilder();

      sb.append("INSERT INTO " + getTableName() + " ");

      int numSlots;
      String [] colNames = getColumnNames();
      if (colNames != null) {
        numSlots = colNames.length;

        sb.append("(");
        boolean first = true;
        for (String col : colNames) {
          if (!first) {
            sb.append(", ");
          }

          sb.append(col);
          first = false;
        }

        sb.append(") ");
      } else {
        numSlots = getColumnCount(); // set if columnNames is null.
      }

      // generates the (?, ?, ?...) used for each row.
      StringBuilder sbRow = new StringBuilder();
      sbRow.append("SELECT ");
      for (int i = 0; i < numSlots; i++) {
        if (i != 0) {
          sbRow.append(", ");
        }

        sbRow.append("?");
      }
      sbRow.append(" FROM DUAL ");

      // Now append that numRows times.
      for (int i = 0; i < numRows; i++) {
        if (i != 0) {
          sb.append("UNION ALL ");
        }

        sb.append(sbRow);
      }

      return sb.toString();
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



