Informix Error -9025
-9025 The column name is not in the current table. Any column used as an
ORDER BY column must be in the current table.The name that is displayed appears after the words ORDER BY, but it is not the name of a column or the display label of an expression that is selected in this statement.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-9025 fires when a name appearing after ORDER BY in the report's ORDER BY clause isn't the name of a column, or the display label of a selected expression, in the current statement — per the official guidance.
- An ORDER BY name that doesn't match a selected column or expression label, per the official guidance — the direct, only cause.
Solutions / Resolution
- Change the ORDER BY name to a column or display label that's actually selected in this statement, per the official guidance.
Examples
An ORDER BY name not in the current SELECT
SELECT customer_name FROM customer ORDER BY customer_id
-- -9025: customer_id isn't selected or labeled in this statement
Corrected
SELECT customer_name, customer_id FROM customer ORDER BY customer_id
Diagnostic Checks
- Check that every ORDER BY name matches a selected column or an expression's display label in the same statement.
Related Errors / Related Topics
- -9004 — "The column name is not in the current table, or the user variable name has not been defined." The general unresolved-name error this is a specific case of, for ORDER BY.
An ORDER BY name wasn't found among the statement's selected columns or labels — add it to the SELECT list or correct the name.