Informix Error -26191: Incorrect use of an external table tablename in query.
Cause and resolution
Incorrect use of an external table tablename in query.
This statement describes an operation that is not allowed on an external table. The types of operations allowed for external tables are CREATE EXTERNAL TABLE, SELECT, DROP TABLE, GRANT (only SELECT and INSERT), REVOKE, CREATE SYNONYM, CREATE SCHEMA, RENAME COLUMN, RENAME TABLE, SELECT ... INTO EXTERNAL.
The types of operations not allowed for external tables are TRUNCATE, UPDATE STATISTICS, START VIOLATION, STOP VIOLATION, ALTER TABLE, UPDATE, DELETE, CREATE TRIGGER, CREATE INDEX, CONNECT BY, INSERT INTO ... VALUES, LBAC operations, target tables of MERGE statements and template table for SAMEAS clause of CREATE EXTERNAL TABLE.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-26191 fires when a statement performs an operation on an external table that isn't allowed — per the official guidance.
- An attempted
TRUNCATE,UPDATE STATISTICS,START/STOP VIOLATION,ALTER TABLE,UPDATE,DELETE,CREATE TRIGGER,CREATE INDEX,CONNECT BY,INSERT INTO ... VALUES, LBAC operation,MERGEtarget, orSAMEAStemplate table, per the official guidance — the direct, only cause; none of these are allowed on external tables.
Solutions / Resolution
- Use only the allowed operations on external tables:
CREATE EXTERNAL TABLE,SELECT,DROP TABLE,GRANT(SELECT/INSERTonly),REVOKE,CREATE SYNONYM,CREATE SCHEMA,RENAME COLUMN,RENAME TABLE,SELECT ... INTO EXTERNAL, per the official guidance.
Examples
N/A
No specific triggering statement is documented beyond one of the listed disallowed operations.
Diagnostic Checks
- Check the statement against the list of allowed/disallowed external-table operations, and restructure it to use only allowed operations.
Related Errors / Related Topics
- -26214 — "Cannot perform this operation on an external table." A related, more specific external-table restriction on subquery/join/BLOB-CLOB usage, part of the same overall class of disallowed operations.
An external table was used in a disallowed operation — restrict to the allowed operation
list (CREATE/SELECT/DROP/GRANT/REVOKE/SYNONYM/SCHEMA/RENAME/SELECT ... INTO EXTERNAL).