Informix Error -8103: In order for the BEFORE or AFTER GROUP OF clause to function properly, the column specified in the clause must also have been specified as a sort column in the ORDER BY command. If the sort column is subscripted, the column in the BEFORE or AFTER GROUP OF clause must be also.
Cause and resolution
In order for the BEFORE or AFTER GROUP OF clause to function properly, the column specified in the clause must also have been specified as a sort column in the ORDER BY command. If the sort column is subscripted, the column in the BEFORE or AFTER GROUP OF clause must be also.
Make sure that the control columns are specified identically in both the ORDER BY statement and the GROUP OF clauses.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-8103 fires when a BEFORE GROUP OF/AFTER GROUP OF clause's column doesn't match an
ORDER BY sort column exactly — per the official guidance, including subscripting: if the
sort column is subscripted, the GROUP OF column must be too.
- The
GROUP OFcolumn not also specified as anORDER BYsort column, per the official guidance — the first named case. - A subscripting mismatch between the
ORDER BYcolumn and theGROUP OFcolumn, per the official guidance — the second named case.
Solutions / Resolution
- Make sure the control columns are specified identically in both the
ORDER BYstatement and theGROUP OFclauses, per the official guidance, including matching subscripts.
Examples
A GROUP OF column not matching ORDER BY
ORDER BY customer_id
...
AFTER GROUP OF order_date
-- -8103: order_date isn't an ORDER BY sort column
Corrected
ORDER BY customer_id
...
AFTER GROUP OF customer_id
Diagnostic Checks
- Compare every
GROUP OFclause's column against theORDER BYlist, including subscripts, and make them match identically.
Related Errors / Related Topics
- -8102 — "There may be only one AFTER or BEFORE GROUP OF clause for any single column
specified in the ORDER BY command." A related
GROUP OF-clause restriction, about duplicated clauses rather than a column/sort mismatch.
A GROUP OF clause's column doesn't match its ORDER BY sort column (including
subscripting) — align them exactly.