SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Utilities
HP NonStop SQL/MX Reference Manual540440-003
5-30
Considerations for import
Use a field qualifier to include field or row delimiters as part of the field data. For
example, suppose that your input file uses a comma (,) to delimit the fields in a record.
Suppose further that a record contains a field consisting of these characters:
Jackson,Jane
You can use a field qualifier to ensure that the comma (,) is included in this field. You
are not required to use a field qualifier for other fields in the row. For example:
135,"Jackson,Jane",100 East St.,Cupertino,CA,95014
If your field data contains a default field qualifier of double quote ("), enclose this field
data within field qualifiers. For example:
135,"Re: "Meeting Request" subject", 01-JUL-1985
If the data is enclosed within field qualifiers, HP recommends that you use a unique
multicharacter string as a field delimiter that can be distinguished from the enclosed
data.
Using a Field Delimiter
Use field delimiters to separate field data for a record. The default field delimiter
character is a comma (','). HP recommends that you use a unique multicharacter field
delimiter string that is not part of enclosed or nonenclosed field data. For example:
135|*| "Re: "Meeting Request|*|" subject" |*| 01-JUL01985
In this example, the field delimiter is part of the data. When import processes this
type of data, as soon as it encounters the first |*| in the data that corresponds to the
second field, it is treated as a field delimiter. import then processes the data following
this first |*| as next field data, and so on through the data. Therefore, in this example,
the column count of the data is considered to be more than the table column count.
Row or Record Delimiters
The new line character (\n) is typically used as a record delimiter in an input data file. If
a new line character already exists in an input file as a record delimiter, you cannot
specify and include a different record delimiter in the file. If you do, import interprets
the new line character as part of a data field.
Under some circumstances, you might want to include a new line character as part of a
data field. For example, suppose that you have data that is to be used as printed text,
and the new line character is included in the data for the purpose of formatting. Then
you must specify a record delimiter other than the new line character.
Null Input Values for Delimited Data Input Files
For a delimited input file, if a column in the target table allows null, you can specify null
for that column in the input file. Two consecutive field delimiters specify null.
For example, suppose that the EMPLOYEE target table begins with the columns
EMPNUM, FIRST_NAME, MIDDLE_INITIAL, and LAST_NAME. The MIDDLE_INITIAL