Informix Error -26091: Table (%s) is not the target table.
Cause and resolution
Table (%s) is not the target table.
This error is generated when a user tries to insert data into a column that is not from the target table. For example:
create table bonus (id int, bonus int); create table emp(id int, salary int);
MERGE INTO bonus D USING emp S ON D.id = S.id WHEN MATCHED THEN UPDATE SET bonus = bonus + salary*.01 WHEN NOT MATCHED THEN INSERT (id, emp.bonus) VALUES (S.id, salary);
This will generate the following error because the emp.bonus table name is not the bonus target table:
26091: Table (emp) is not the target table. Error in line 4 Near character position 47
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-26091 fires when a MERGE statement's INSERT column list qualifies a column with a
table name that isn't the target table — per the official guidance.
- The
INSERTcolumn list uses a table-qualified column reference naming the source table (or another table) instead of the target table, per the official guidance — the direct, only cause.
Solutions / Resolution
- Qualify
INSERTcolumn-list references with the target table's own name/alias, per the official guidance, or leave them unqualified.
Examples
A source-table-qualified column in the INSERT list
MERGE INTO bonus D
USING emp S ON D.id = S.id
WHEN MATCHED THEN UPDATE SET bonus = bonus + salary*.01
WHEN NOT MATCHED THEN INSERT (id, emp.bonus) VALUES (S.id, salary);
-- -26091: emp.bonus qualifies with emp, not the target table bonus
Corrected
MERGE INTO bonus D
USING emp S ON D.id = S.id
WHEN MATCHED THEN UPDATE SET bonus = bonus + salary*.01
WHEN NOT MATCHED THEN INSERT (id, bonus) VALUES (S.id, salary);
Diagnostic Checks
- Check every table-qualified column reference in the
INSERTcolumn list, and confirm the qualifier is the target table.
Related Errors / Related Topics
- -26090 — "Column (%s) not found in the target table." A related
MERGEcolumn- scoping error, on an unqualified column name from the wrong table rather than a wrong table qualifier. - -26093 — "Table (%s) is not the source table." The mirror-image error, on the
VALUESclause qualifying with a table other than the source.
The INSERT column list qualified a column with a table other than the target table — use
the target table's own qualifier or none.