SET_FIELDS_NULL

Applies to: ORAFlex SQLFlex MYSQLFlex PGFlex DB2Flex

This command is used to specify how to store blank or zero values in the database. Since database can sometimes store these value, i.e. ‘’ or 0, as null, using this command can be useful in managing that. When set to true, any value in a column of the given type considered blank or 0 will be stored as null in the database. Setting it to false will cause the server to save as it normally would. Note that this command is used to set specific data types only, it can not effect all types at once. Below is a list of value that would be considered blank/zero values.

DF_ASCII and DF_TEXT - ‘ ‘ (one blank space)

DF_BCD - 0 (zero)

DF_DATe and DF_DATETIME - 00/00/0000 for MYSQL 01/01/0001 for Oracle MSSQL, and Postgre 01/01/1753 for MSSQL Datetimes

DF_BINARY - 0X0

Syntax

SET_FIELDS_NULL {datatype} to {variable}

Parameter

Description

datatype

DF_ASCII, DF_BCD, or DF_DATE

variable

Boolean to indicate how to handle blank data