Informix Error -9650: Right hand side of IN expression must be a COLLECTION type.
Cause and resolution
Right hand side of IN expression must be a COLLECTION type.
The column that is specified for the IN clause must be a COLLECTION type. For other data types you must specify values in a parenthesized list. For example:
SELECT * FROM CUSTOMER WHERE CUSTOMER_NUM IN (101);
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-9650 fires when an IN clause's right-hand side column reference isn't a COLLECTION type — per the official guidance.
- A non-COLLECTION column referenced as the IN clause's right-hand side, per the official guidance — the direct, only cause; other data types must use a parenthesized value list instead.
Solutions / Resolution
- Specify values in a parenthesized list for non-COLLECTION types, per the official
guidance — for example,
SELECT * FROM CUSTOMER WHERE CUSTOMER_NUM IN (101);.
Examples
An invalid IN right-hand side
SELECT * FROM customer WHERE customer_num IN some_scalar_col; -- -9650
Corrected
SELECT * FROM customer WHERE customer_num IN (101);
Diagnostic Checks
- Check the IN clause's right-hand side, and use a parenthesized value list unless it's genuinely a COLLECTION-type column.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -9650 in this set yet.
The IN clause's right-hand side wasn't a COLLECTION type — use a parenthesized value list instead.