Informix Error -2956: You may not set display field field-tag to a value because none of its associated database columns belong to the same table as table, nor is it a variable display-only field.
Cause and resolution
You may not set display field field-tag to a value because none of its associated database columns belong to the same table as table, nor is it a variable display-only field.
You cannot assign values in a LET statement across tables. All columns that are associated to the field-tag in a LET statement must belong to tables that are named in the opening command of the control block, or it must be a display-only field.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-2956 fires when a LET statement assigns a value to a field whose associated columns don't
belong to a table named in the control block's opening command, and the field isn't a
display-only variable either — per the official guidance, values cannot be assigned across
tables in a LET statement.
- A
LETtarget field whose associated columns belong to a different table than the ones named in the control block's opening command, per the official guidance — the direct cause. - The target field is not a display-only field, per the official guidance — the exception that would otherwise permit the assignment.
Solutions / Resolution
- Confirm every column associated with the
LETtarget field belongs to a table named in the control block's opening command, per the official guidance. - Alternatively, make the field a display-only field, per the official guidance, if it doesn't need to be tied to a table column.
Examples
A LET target belonging to the wrong table
AFTER UPDATE OF orders
LET customer.name = "Unknown";
-- -2956: customer.name isn't in the orders table named in this block
Corrected
AFTER UPDATE OF orders
LET status = "Reviewed";
-- status is DISPLAYONLY, so no table membership is required
Diagnostic Checks
- Check the table membership of every column associated with a
LETtarget field, and confirm it matches the enclosing control block's table, or mark the fieldDISPLAYONLY.
Related Errors / Related Topics
- -2944 — "You may apply the after add, update, query, or remove commands to a table
only -- not a column." A related control-block-scoping error, about the block's own opening
command rather than a
LETtarget inside it. - -2945 — official title text duplicated from -2944 on the live site, but its actual
description covers the same aggregate/table-membership scoping rule that -2956 applies to
LETassignments.
A LET statement assigns to a field whose columns aren't in the control block's table, and
the field isn't display-only — align the table or mark it DISPLAYONLY.