Informix Error -352
-352 Column column-name not found.
The column, or one of the columns, named in this CREATE INDEX statement does not exist. Review the spellings of all columns in the statement. See the discussion of error -328 for a way to list all column names in a table.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-352 fires when CREATE INDEX references a column name that doesn't exist on the target table.
- A misspelled column name in the
CREATE INDEXcolumn list — the most common cause. - A column that was renamed or dropped since the index-creation script was originally written.
- Wrong table targeted — the column exists, but on a different table than the one named in
CREATE INDEX. - Case or naming-convention mismatches carried over from application code that don't match the actual database column name.
Solutions / Resolution
- Verify the spelling of every column referenced, per the official guidance, against the table's actual structure.
- List the table's actual columns via
syscolumns(the same technique used for-328):SELECT colname FROM syscolumns WHERE tabid = (SELECT tabid FROM systables WHERE tabname = 'orders'); - Check for a recent column rename or drop if a previously-working
CREATE INDEXscript started failing.
Examples
A misspelled column name
CREATE INDEX idx_orders_custid ON orders(custmer_id);
-- -352: custmer_id doesn't exist (typo for customer_id)
Fix:
CREATE INDEX idx_orders_custid ON orders(customer_id);
Listing actual columns to confirm the correct name
SELECT colname FROM syscolumns
WHERE tabid = (SELECT tabid FROM systables WHERE tabname = 'orders');
Diagnostic Checks
- Query
syscolumnsfor the target table to confirm the exact column names available. - Confirm the correct table is being targeted if the column name looks right but still isn't found.
Related Errors / Related Topics
- -328 — "Column column-name already exists in table." The mirror-image error — this one
fires when a column is expected to be new but already exists;
-352fires when a column is expected to exist but isn't found.
Query syscolumns for the table's actual column list before assuming a typo — it's the fastest
way to confirm the exact spelling and whether the right table is even being targeted.