Informix Error -9060: The values m and n used to subscript name are outside the bounds for the column's defined length.
Cause and resolution
The values m and n used to subscript name are outside the bounds for the column's defined length.
A column substring in the ORDER BY clause is incorrect. When taking a substring of a column, the first number in brackets specifies the position of the first character, and the second number specifies the position of the last character of the substring. Both numbers must be at least 1 and not greater than the total length of the column or variable.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-9060 fires when a column substring in the ORDER BY clause uses subscript bounds that fall outside the column's or variable's defined length — per the official guidance.
- A subscript position less than 1, per the official guidance.
- A subscript position greater than the column's/variable's total defined length, per the official guidance.
Solutions / Resolution
- Correct the first subscript number to the position of the first character wanted, at least 1, per the official guidance.
- Correct the second subscript number to the position of the last character wanted, no greater than the total length, per the official guidance.
Examples
An out-of-bounds subscript
ORDER BY customer_name[1,50] -- -9060 if customer_name is only CHAR(30)
Corrected
ORDER BY customer_name[1,30]
Diagnostic Checks
- Check the column's/variable's defined length, and correct the subscript bounds to fit within it.
Related Errors / Related Topics
- -9001 — "Only columns of type CHARACTER may be subscripted or printed without trailing blanks." A related column-subscripting error, on type rather than bounds.
A column substring subscript in ORDER BY fell outside the column's defined length — correct the bounds.