If TERMINATED BY
is specified for a field without ENCLOSED BY
, then the data for the field is read from the starting position of the field up to, but not including, the first occurrence of the TERMINATED BY
delimiter. If the terminator delimiter is found in the first column position of a field, then the field is null. If the end of the record is found before the TERMINATED BY
delimiter, then all data up to the end of the record is considered part of the field.
If TERMINATED BY WHITESPACE
is specified, then data is read until the first occurrence of a whitespace character (spaces, tabs, blanks, line feeds, form feeds, or carriage returns). Then the current position is advanced until no more adjacent whitespace characters are found. This allows field values to be delimited by varying amounts of whitespace. However, unlike non-whitespace terminators, if the first column position of a field is known and a whitespace terminator is found there, then the field is not treated as null and can result in record rejection or fields loaded into incorrect columns.