SQL Null Handling

SQL Null support has been introduced mainly for Other File integration.

SQL Null indicates that data is unknown. For example, the field #BirthDate could be SQL Null for a record read from file Person, indicating that we do not have the person's birthdate. Without SQL Null support, the only alternative is to set the date something unlikely (such as 0001-01-01).

A field must have the ASQN (Allow SQL Nulls) attribute to utilize SQL Null functionality such as the *SQLNULL Keyword, the Intrinsic Property .IsSqlNull, and the Intrinsic Method .AsValue.

At execution time, a field that allows SQL Null either has a real value or is SQL Null. Fields allowing SQL Null may behave differently at execution time when they are SQL Null, and this behavior is also dependent on whether the function option *STRICT_NULL_ASSIGN has been specified. Refer to Assignment, Conditions, and Expressions with Fields allowing SQL Null for further details.

When working with Other Files, behaviour for SQL Null fields may vary on Insert and Update, if the database definition of the column differs from the LANSA definition. Refer to UPDATE Comments/Warnings for further details.