Product Documentation

FairCom ISQL

Previous Topic

Next Topic

Data File Formats

Data files must be in one of the following record formats:

  • Variable-length records
  • Fixed-length records

For both these types of records, an optional field delimiter and an optional record delimiter can be specified. The field delimiter, when specified, should be a single character. By default, comma is the field delimiter. The record delimiter can be specified in the commands file and it can be more than one character. By default, the newline character, \n, is the record delimiter.

String Formatting Qualifiers

It is common for CSV files to surround string fields with a qualifier (typically a double quotation mark: "string"). dbload does not support string qualifiers. It is necessary remove all string qualifiers from the CSV.

In some cases, a string field includes the same character used as a field delimiter. For example, these three fields use a comma as a delimiter:

"6300 W Sugar Creek Drive, Columbia", "MO", "USA"

A comma also appears in the first field "6300 W Sugar Drive, Columbia". When the string qualifiers are removed, this field appears to be two fields.

6300 W Sugar Creek Drive, Columbia, MO, USA

In this case, the field delimiter must be changed to a character that does not appear in the string, for example, a semi-colon (;):

6300 W Sugar Creek Drive, Columbia; MO; USA

Variable-Length Records

For variable-length records, the fields in the data file can be of varying length. Unless the keyword FIXED is used in the commands file, it is assumed that the dbload record processing will be for variable-length records.

Fixed-Length Records

For fixed-length records, the fields in the data file must be of fixed length. The length of the record must be the same for all records and is specified in the commands file. In case of fixed-length records, the field and record delimiters are ignored. That is, the POSITION specification must be such that the delimiters are ignored. For more information on the commands file refer to The Commands File.

The data files that contain fixed-length records can either be ASCII or binary files.

TOCIndex