Informix Error -862
-862 Alter fragment attach must have at least one consumed table specified.
You have not specified a table to be consumed. See the syntax and usage for ALTER FRAGMENT... ATTACH in the IBM Informix Guide to SQL: Syntax.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-862 fires when ALTER FRAGMENT ... ATTACH is issued with no table named to consume — per the
official guidance, at least one table must be specified.
ALTER FRAGMENT ... ATTACHwith an empty (or entirely omitted) table list — the direct, only cause.- A generated
ATTACHstatement's table list ending up empty due to an upstream logic error (for example, a filter that excluded every candidate table).
Solutions / Resolution
- Specify at least one table to attach, per the official guidance — consult the
ALTER FRAGMENT ... ATTACHsyntax in the IBM Informix Guide to SQL: Syntax, per the official guidance's own pointer, for the full documented syntax. - Review whatever logic generated the
ATTACHstatement if the empty table list was unexpected, to find why no tables ended up in the list.
Examples
The disallowed attempt
ALTER FRAGMENT ON TABLE orders ATTACH;
-- -862: no table specified to consume
Corrected
ALTER FRAGMENT ON TABLE orders ATTACH orders_2025;
Diagnostic Checks
- Check the
ATTACHclause's table list for emptiness, and trace back to why, if it was generated programmatically.
Related Errors / Related Topics
- -779 — "Duplicate table name in the alter fragment specification." A related
ATTACHrestriction, about a name repeated rather than the list being empty. - -782 — "Attached table is fragmented." A related
ATTACHrestriction, on the attached table's own structure. - -786 — "Cannot attach to this table because it is not in the list of tables in the ATTACH
clause." A related
ATTACHrestriction, about the surviving table's own required listing.
Specify at least one table in the ATTACH clause — consult the documented ALTER FRAGMENT ... ATTACH syntax for the full requirements.