Informix Error -26601: Cannot define a partial-column index on the non-character column, column-name.
Cause and resolution
Cannot define a partial-column index on the non-character column, column-name.
You can specify a substring size in the CREATE INDEX statement only for columns of character data types, such as CHAR, LVARCHAR, NCHAR, NVARCHAR, or VARCHAR. For the specified column, the index key must be the entire column value.
Remove the substring size value that follows the column name and rerun the statement.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-26601 fires when CREATE INDEX specifies a substring size on a non-character
column — per the official guidance.
- A substring size specified for a column that isn't a character type (
CHAR,LVARCHAR,NCHAR,NVARCHAR,VARCHAR), per the official guidance — the direct, only cause.
Solutions / Resolution
- Remove the substring size following the column name and rerun the statement, per the official guidance — the index key must be the entire column value for non-character columns.
Examples
A substring size on a non-character column
CREATE INDEX idx1 ON orders (order_id(4));
-- -26601: order_id is INTEGER, not a character type
Corrected
CREATE INDEX idx1 ON orders (order_id);
Diagnostic Checks
- Check the column's data type when a substring size is specified in
CREATE INDEX, and remove the substring size if it isn't a character type.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -26601 in this set yet.
A partial-column (substring) index was specified on a non-character column — remove the substring size.