Text or CSV Export Format

Export data to text or CSV (comma separated values). The export process is performed by Database Tour export engine with direct file access and therefore is very fast.

The data can be exported to text or CSV format either from Database Tour (Pro) GUI or from the Database Tour Pro command line.

When exporting data from GUI, switch to Text / CSV page of the Export dialog. If this page is not visible, click Favorite Export Formats button in the top-right corner of the window and make sure the corresponding format is selected.

Exporting Data to CSV

Format Specific Options

File - file name to export data to, when exporting data from one table or SQL query. The option is not available when exporting data to clipboard.

Folder - folder name to export data to, when exporting data from a group of tables (multi-table export). Each table will be exported to a separate file in the specified folder; file names can be specified in Table Mappings. The option is not available when exporting data to clipboard.

Schema - schema of exporting

None

Data are exported to a single output file (without using schema file).

ADO

Data are exported to one file, and the schema (description of the fields) is stored in a separate file Schema.ini, which is located in the output folder and used for all such files from this folder. The format of the schema files is compatible with Microsoft Data Access Components (MDAC) specification, so such output files can be correctly opened in any application that uses ADO, including Database Tour.

Notes
Schema file is not created when data are exported to clipboard.

BDE

Data are exported to one file, and the schema (description of the fields) is stored in a separate file file_name.sch, where file_name equals to file name of the main file but without extension. The format of the schema files is compatible with Borland Database Engine (BDE) specification, so such output files can be correctly opened in any application that uses BDE, including Database Tour.

Notes
Schema file is not created when data are exported to clipboard.

Command line equivalent: /TextSchema.

Field separator - character, which is used to separate fields in output file. If 'None' specified, no separator will be used, and the output file will have fields with fixed length. In fixed-length files, field data, which shorter than the field width, is completed by spaces. Command line equivalent: /Separator.

Quote character - quote character. The quote character is placed around field data if the field data contains embedded field separator(s) or quote character(s), and when more than one field is exported. Embedded quote character is represented by a pair of consecutive quote characters. This option is ignored for fixed-length files. Command line equivalent: /QuoteChar.

Encoding - output encoding (e.g. ASCII, UTF-8 etc). Command line equivalent: /Encoding.

BOM - include BOM (byte order mark) when using Unicode encoding. Reverse command line equivalent: /NoBom.

Append timestamp to file - append current timestamp to the end of the target file name. The timestamp mask is _YYYYMMDD_HH24MISS. Note: It is not recommended to use this option together with BDE schema. Command line equivalent: /AppendTimestamp.

Include MEMO fields - include contents of MEMO / CLOB fields in target; in the latter case, a constant describing the field type will be used instead of the field contents. MEMO / CLOB fields can store large amount of text, so including them for this target format can significantly affect the results, especially if the text contains line or column breaks or other special characters. Command line equivalent: /IncludeMemo.

Include column names - include the column names in target. Ignored for BDE schema. Command line equivalent: /IncludeColNames.

Quote all fields - quote all fields in target or not. Using this option forces quoting all fields when more than one field is exported. This option is ignored for fixed-length files. Command line equivalent: /QuoteAllFields.

Trim trailing spaces - trim trailing spaces and control characters in target. Applicable for char and varchar data only. Using this option allows to remove useless data and thus reduce the output volume.

Line break - line break style; if you choose Windows, then each line in the file will be terminated by carriage return and new line character (CR+LF); if you choose Mac, a carriage return (CR) will be used to separate lines; otherwise, Unix style will be used (LF). Command line equivalent: /LineTerminator.

Export mode

REPLACE+INSERT

Target file is created and filled with incoming rows; if the target file already exists, it is overwritten.

CREATE_OR_REPLACE

Blank target file (using appropriate structure) is created; if the target file already exists, it is overwritten.

APPEND

Target file is appended with incoming rows; if the target file does not exist, it is created.

Notes
The format and field structure must be compatible with existing target.

Note: For multi-table exporting, the value can be overridden for each individual table-to-file pair in Table mappings section.

Command line equivalent: /ExportMode.

Record range

Range of source records to be exported:

  • Full table - all records are exported.
  • Selected records only - only selected records are exported. To select rows, click the corresponding button and then select needed rows using Shift, Ctrl and arrow keys.
  • From current record to the last one - all data between current and the last records are exported.

Limit the record count to - maximum number of records to be exported. If this option is not specified or it is less then 1, all records from the specified record range will be exported. If you just want to create a file without data exporting, use the corresponding Export mode instead. Command line equivalent: /LimitRecordCount.

Column range

Range of source columns to be exported:

  • All columns - all columns (including columns, which were temporary hidden by user) are exported.
  • Selected column only - only selected (current) column is exported.
  • Visible columns - only visible columns are exported.

Source records per target row

Number of records from source database to be placed into one line of the target file (only when Schema is None). For example, if you specify 2, the source data will be placed to the target in the following way:

Source Target
Col1 Col2   Col1 Col2 Col1 Col2
cell1 cell2  >>  cell1 cell2 cell3 cell4
cell3 cell4   cell5 cell6 cell7 cell8
cell5 cell6          
cell7 cell8          

This option is useful when source have a small count of columns and a large count of rows. Using it, you can fill target area more optimally.

Command line equivalent: /RecordsPerLine.

Other options

Ask before overwrite or empty existing target - ask the user to overwrite existing target for REPLACE+INSERT and CREATE_OR_REPLACE export modes. The option is not available when exporting data to clipboard. Reverse command line equivalent: /SuppressOverwriteOrDeletePrompt.

See also