Informix Error -25850: The window-frame extent specification requires a window-order clause.
Cause and resolution
The window-frame extent specification requires a window-order clause.
Any window-frame extent specification also requires the window-order clause, unless the window frame is between UNBOUNDED PRECEDING and UNBOUNDED FOLLOWING.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-25850 fires when a window function specifies a window-frame extent without a
window-order clause — per the official guidance, a window-order clause is required unless
the frame is exactly BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING.
- A window-frame extent given without a window-order clause, per the official
guidance — the direct, only cause, except for the
UNBOUNDED PRECEDING/UNBOUNDED FOLLOWINGspecial case.
Solutions / Resolution
- Add a window-order clause (
ORDER BY), per the official guidance, or - Use
BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING, per the official guidance, if no ordering is actually needed.
Examples
N/A
No specific triggering statement is documented beyond a missing window-order clause.
Diagnostic Checks
- Check the window function's frame extent, and add an
ORDER BYclause unless the frame isUNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING.
Related Errors / Related Topics
- -25851 — "The window-frame extent value specification are not correct." A related window-frame error, on the frame's value types rather than a missing order clause.
- -25852 — "The window-frame extent BETWEEN options are not valid." A related
window-frame error, on
BETWEENsyntax generally.
A window-frame extent was specified without a window-order clause — add ORDER BY, or use
UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING.