Informix Error -26090: Column (%s) not found in the target table.
Cause and resolution
Column (%s) not found in the target table.
This error is generated when a user tries to insert or update 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, salary) VALUES (S.id, salary);
This will generate the following error because salary in the insert column list is not from the target table, bonus:
26090: Column (salary) not found in the target table. Error in line 4 Near character position 41
MERGE INTO bonus USING emp ON bonus.id = emp.id WHEN MATCHED THEN UPDATE SET salary = 1000 WHEN NOT MATCHED THEN INSERT VALUES (10, 100);
This will generate the following error because salary in the set clause of the update is not from the target table, bonus:
26090: Column (salary) not found in the target table. Error in line 3 Near character position 44
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-26090 fires when a MERGE statement's INSERT column list or UPDATE SET clause names a
column that isn't from the target table — per the official guidance.
- The
INSERTcolumn list names a column from the source table instead of the target table, per the official guidance — the first named case. - The
UPDATE SETclause names a column from the source table instead of the target table, per the official guidance — the second named case.
Solutions / Resolution
- Use only target-table columns in the
INSERTcolumn list andUPDATE SETclause, per the official guidance.
Examples
A source-table 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, salary) VALUES (S.id, salary);
-- -26090: salary isn't a column of bonus, the target table
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 column named in the
INSERTlist andUPDATE SETclause, and confirm each belongs to the target table.
Related Errors / Related Topics
- -26091 — "Table (%s) is not the target table." A related
MERGEcolumn/table- qualification error, on a table-qualified reference naming the wrong table rather than a bare column name being from the wrong table. - -26092 — "Column (%s) is not found in the source table." The mirror-image error, on
the
VALUESclause referencing a column not in the source table. - -26093 — "Table (%s) is not the source table." The mirror-image error, on a table-
qualified reference in the
VALUESclause naming the wrong table.
A MERGE statement's INSERT/UPDATE SET referenced a column not from the target table —
use only target-table columns there.