QuotedValue option

Specifies whether data values are surrounded by quotation marks. The default is no.

Specify SINGLE or YES to require single quotation marks or DOUBLE to require double quotation marks. You can precede the opening quotation mark or follow the closing quotation mark with spaces. You can use the actual quotation mark characters if you enclose them in double quotation marks. The system recognizes the end of the field by a field-delimiter character or an end-of-row sequence.

The system recognizes a quoted value when the first non-space character is the quotation character that you specified for the QuotedValue option. If the first non-space character is not the specified quotation character, the system handles it according to the normal rules. In particular, leading or trailing spaces in string fields are considered part of the value of the string.

Consider the following command, which uses the QuotedValue option:
nzload -quotedValue SINGLE -nullValue 'NULL' -delim '|'
The command has the following effects:
  • |NULL| is a null input field.
  • |’NULL’| is a null input field.
  • | I’m | is a non-null input field that contains the text “I’m.”
  • | ‘I’’m’ | is a non-null input field that contains the text “I’m.”
  • | ‘|’ | is a non-null input field that contains the single character “|.”
  • |’ ‘| is a non-null input field that contains a single space.
  • | | is a non-null input field that contains a single space.
  • | ‘‘ | is a non-null input field that contains a zero-length string.
  • || is a non-null input field that contains a zero-length string.

Unlike the EscapeChar option, the QuotedValue option cannot force the system to accept the NullValue value as a valid non-null input value.

The system overhead for processing quoted value syntax is much greater than that of the default unquoted syntax. Except for strings that contain three or more field delimiters that must be escaped and no embedded quotation marks, using the QuotedValue option results in more bytes of input data than using the EscapeChar option. When you have a choice, use unquoted syntax.

If you expect all values in all input fields (string or otherwise) to be uniformly enclosed in quotation marks, use the RequireQuotes option to cause the system to enforce this usage. Using the RequireQuotes option improves the parsing overhead and provides extra robustness.

The QuotedValue option is not supported for the fixed-length format.