Informix Error -25807: The fragment key for interval fragmentation must be a single column expression.
Cause and resolution
The fragment key for interval fragmentation must be a single column expression.
The fragment key, which is the column expression on which the table or index is fragmented, must be a single column expression. For example, the following statement generates an error:
CREATE TABLE employee (emp_id INTEGER, emp_name CHAR(64), ssn CHAR(12), basepay FLOAT, varpay FLOAT, dept_id SMALLINT) FRAGMENT BY RANGE(ROUND(basepay+varpay)) INTERVAL(2000) STORE IN (dbs1, dbs2, dbs3) PARTITION p1 VALUES < 0 IN dbs3;
The fragment key references two columns, basepay and varpay, which is not allowed.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-25807 fires when FRAGMENT BY RANGE(...)'s expression references more than one
column — per the official guidance.
- A fragment-key expression referencing multiple columns, per the official guidance — the direct, only cause.
Solutions / Resolution
- Rewrite the fragment key to reference only a single column, per the official guidance.
Examples
A fragment key referencing two columns
CREATE TABLE employee (emp_id INTEGER, emp_name CHAR(64), ssn CHAR(12),
basepay FLOAT, varpay FLOAT, dept_id SMALLINT)
FRAGMENT BY RANGE(ROUND(basepay+varpay)) INTERVAL(2000) STORE IN (dbs1, dbs2, dbs3)
PARTITION p1 VALUES < 0 IN dbs3;
-- -25807: references both basepay and varpay
Diagnostic Checks
- Check the fragment-key expression for references to more than one column, and rewrite it around a single column.
Related Errors / Related Topics
- -25806 — "The fragment key for interval fragmentation must be a numeric, DATE, or DATETIME type." A related fragment-key restriction, on type rather than column count.
- -25808 — "The expression defining the upper limit of each fragment must be a constant." A related interval-fragmentation syntax restriction.
An interval fragmentation key referenced more than one column — rewrite it around a single column.