Informix Error -9654: The element types of the collection are not unique; explicit casting is required.
Cause and resolution
The element types of the collection are not unique; explicit casting is required.
The element types of the complex type (row, set, multiset, or list) are not unique and cannot be converted from one complex type to another complex type by implicit casting. Use the explicit casting notation to explicitly cast the source complex type to the desired target complex type.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-9654 fires when a complex type's (row, set, multiset, or list) element types aren't unique, blocking implicit conversion between complex types — per the official guidance.
- Non-unique element types preventing implicit casting between complex types, per the official guidance — the direct, only cause.
Solutions / Resolution
- Use explicit casting notation to cast the source complex type to the target complex type, per the official guidance.
Examples
Requiring an explicit cast between complex types
SELECT CAST(my_multiset AS LIST(ROW(INT, INT) NOT NULL)) FROM tab;
Diagnostic Checks
- Check the source and target complex types' element-type definitions, and add an explicit CAST if implicit conversion is blocked by non-uniqueness.
Related Errors / Related Topics
- -9602 — "Illegal attempt to convert a collection type into another type." A related collection-conversion error, on host-variable type mismatches rather than requiring explicit casting due to non-unique element types.
A complex type's non-unique element types blocked implicit conversion — use an explicit CAST.