TEMP_EXTRACT_NULL_AS_ZERO Option

Controls the representation of null values in the output of the data extraction facility for an ASCII extraction.

Allowed Values

ON, OFF

Default

OFF

Scope

Can be set for an individual connection. Takes effect immediately.

Description

TEMP_EXTRACT_NULL_AS_ZERO controls the representation of null values in the output of the data extraction facility for ASCII extractions. When TEMP_EXTRACT_NULL_AS_ZERO is set to ON, a null value is represented as follows:
  • '0' for arithmetic type

  • '' (the empty string) for the CHAR and VARCHAR character types

  • '' (the empty string) for dates

  • '' (the empty string) for times

  • '' (the empty string) for timestamps

The quotes shown above are not present in the extract output file. When the TEMP_EXTRACT_NULL_AS_ZERO option is set to OFF, the string 'NULL' is used in all cases to represent a NULL value. OFF is the default value.

Note: In Sybase IQ 12.5, an ASCII extract from a CHAR or VARCHAR column in a table always returns at least four characters to the output file. This is required if TEMP_EXTRACT_NULL_AS_ZERO is set to OFF, because Sybase IQ needs to write out the word NULL for any row in a column that has a null value. Reserving four spaces is not required if TEMP_EXTRACT_NULL_AS_ZERO is set to ON.

In Sybase IQ 12.6, if TEMP_EXTRACT_NULL_AS_ZERO is set to ON, the number of characters that an ASCII extract writes to a file for a CHAR or VARCHAR column equals the number of characters in the column, even if that number is less than four.

For details on the data extraction facility and using the extraction options, see System Administration Guide: Volume 1 > Data Import and Export > Methods of Exporting Data from a Database > Data Extraction Facility.