Previous Topic: -85 - ORDER BY MUST FOLLOW ALL QUERIES WHEN PERFORMING A UNIONNext Topic: -87 - CANNOT USE <UNION> AND <UNION ALL> IN SAME STATEMENT


-86 - NULL NOT ALLOWED IN COLUMN aaaa

Reason:

A null value is not allowed in the indicated column.

The SQLSTATE that equates to this SQL return code is 23502. Users of DATACOM VIEW (a DATACOM VIEW is a CA Datacom extension to the CREATE VIEW statement that allows access to legacy data) may see the -86 SQLCODE appear with a message of the form: NULL NOT ALLOWED IN COLUMN view-column-name CO-ELEMENT #n (NOT IN VIEW). This variant only occurs when a DATACOM VIEW user does an INSERT into a view that contains only a portion of an array whose elements are defined as NOT NULL, and the non-included portions of the array have no default values defined. We advise against defining views containing only portions of arrays, but for flexibility we allow it to occur. The CO-ELEMENT #n number in the variant message text is the array index of the non-included array element, and view-column-name is the name of some element that is included in the view (to allow identification of the column involved, within the context of the view with which work is being done).

Action:

Inspect the indicated statement and make the appropriate correction. Null values may not appear as host variables or parameter values.