Informix Error -26092: Column (%s) is not found in the source table.
Cause and resolution
Column (%s) is not found in the source table.
This error is generated when a user tries to insert data into the target table using a column 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 (D.id, D.bonus) VALUES (S.id, bonus);
This will generate the following error because in the VALUE clause the bonus column is not from the emp source table:
26092: Column (bonus) not found in the source table. Error in line 4 Near character position 66
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-26092 fires when a MERGE statement's VALUES clause references a column that isn't
from the source table — per the official guidance.
- The
VALUESclause names a column from the target table instead of the source table, per the official guidance — the direct, only cause.
Solutions / Resolution
- Use only source-table columns in the
VALUESclause, per the official guidance.
Examples
A target-table column in the VALUES clause
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 (D.id, D.bonus) VALUES (S.id, bonus);
-- -26092: bonus isn't a column of emp, the source 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 (D.id, D.bonus) VALUES (S.id, salary);
Diagnostic Checks
- Check every column named in the
VALUESclause, and confirm each belongs to the source table.
Related Errors / Related Topics
- -26090 — "Column (%s) not found in the target table." The mirror-image error, on the
INSERT/UPDATE SETreferencing a column not in the target table. - -26093 — "Table (%s) is not the source table." A related
MERGEcolumn-scoping error, on a table-qualified reference naming the wrong table rather than an unqualified column being from the wrong table.
A MERGE statement's VALUES clause referenced a column not from the source table — use
only source-table columns there.