code: public int append2SQLSelect(final SQLSelect _select,
                                  final int _colIndex)
          throws EFapsException
      {
          final Type type;
          if (this.selectParts.size() > 0) {
              type = this.selectParts.get(this.selectParts.size() - 1).getType();
          } else {
              type = this.query.getMainType();
          }
          final int ret;
          if (this.valueSelect == null) {
              ret = this.fromSelect.getMainOneSelect().getValueSelect().append2SQLSelect(type, _select, this.tableIndex,
                                                                                         _colIndex);
          } else {
              ret = this.valueSelect.append2SQLSelect(type, _select, this.tableIndex, _colIndex);
          }
  
          return ret;
      }
docs: Method used to append to the select part of an SQL statement.
  
  @param _select       SQL select statement
  @param _colIndex     actual column index
  @return number of columns added in this part of the SQL statement
  @throws EFapsException on error