Specifying the result set structure of CSV and Text files

You use the Result set structure page of the CSV File Import wizard to customize the columns of the result set, and which columns are displayed.

About this task

By specifying the options in the Field definitions table, you can customize the structure of the imported result set:

Procedure

  1. Select what columns to include in the result set by checking the check boxes to the left of the Field name column.
  2. To edit a column name, click a cell in the Field name column and enter a new name.
  3. To specify a different data type, click a cell in the Type column and select a data type from the list. Available options are the following:
    • INTEGER can be used to store signed whole numbers between -2 147 483 648 and 2 147 483 647.
    • BIGINT can be used to store large signed whole numbers between -9 223 372 036 854 775 808 and 9 223 372 036 854 775 807.
    • DOUBLE can be used to store large numbers with a floating decimal point.
    • CHAR is used to store fixed-length string of characters. For example, you can use it to store employee phone number which is generally fixed in length.
    • VARCHAR is used to store variable-length string of characters like employee name.
    • DECIMAL is used to store the fixed precision and scale numbers. This data type should be used for precise values, such as currency.
    • DATE is used to store a date only.
    • TIME is used to store a time only.
    • TIMESTAMP is used to store both a date and a time.
    Note: DATE, TIME, and TIMESTAMP data types support different format options that define how the values are displayed in the result set.
    Note: The supported ranges and the precision of values might vary depending on the database you use.
  4. In the Length field, specify a maximum number of characters for the VARCHAR type.
    Note: When you import a query result set from a CSV or TXT file, QMF scans the first 1000 rows of the result set to determine the maximum length of the VARCHAR data type. If the subsequent rows contain the VARCHAR data type that is longer than this maximum value, the cell value is truncated. You can increase the length of the data type in the Field definitions table.
  5. In the Precision field, specify a maximum total number of digits for the DECIMAL type.
  6. In the Scale field, specify a maximum number of:
    • fractional digits for the DECIMAL type
    • digits in the fractional seconds part for the TIMESTAMP or TIMESTAMP WITH TIMEZONE type
  7. In the Preview pane, you can track how each selection changes the layout of the result set.
  8. Click Finish.
    The CSV File Import wizard closes and the new result set opens in the editor window.