Informix Error -873
-873 Invalid fragment expression column.
You cannot use columns from different tables in a fragment expression.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-873 fires when a fragmentation expression references a column from a table other than the one being fragmented — per the official guidance, columns from different tables can't be mixed into a single fragment expression.
- A fragmentation expression accidentally referencing a column from a different table — per the official guidance, the direct, only cause.
- A copy-pasted fragmentation expression from a similar table's DDL, carrying over a column reference that doesn't exist (or means something different) on the table actually being fragmented.
Solutions / Resolution
- Review the fragmentation expression's column references, confirming each one belongs to the table actually being fragmented.
- Correct any reference to a column from a different table, replacing it with the equivalent column (or a derived value) on the current table.
Examples
The disallowed cross-table reference
CREATE TABLE order_items (item_id INT, order_id INT)
FRAGMENT BY EXPRESSION
(orders.region = 'east') IN dbspace1, REMAINDER IN dbspace2;
-- -873: orders.region is a column on a different table
Corrected — a column on order_items itself
CREATE TABLE order_items (item_id INT, order_id INT, region CHAR(10))
FRAGMENT BY EXPRESSION
(region = 'east') IN dbspace1, REMAINDER IN dbspace2;
Diagnostic Checks
- Check every column referenced in the fragmentation expression against the table's own column list, confirming none belong to a different table.
Related Errors / Related Topics
- -869 — "Subqueries and procedures are not allowed in fragmentation expressions." A related fragmentation-expression restriction, about disallowed expression types rather than a cross-table column reference.
- -872 — "Invalid fragment strategy or expression for the unique index." A related restriction, about a unique index's expression referencing a column outside its own key columns (on the same table), rather than a different table entirely.
A fragmentation expression can only reference the table's own columns — check for an accidental cross-table reference.