Informix Error -25854: The ntile, lead, lag, ranking and row numbering window functions cannot have a window-frame extent.
Cause and resolution
The ntile, lead, lag, ranking and row numbering window functions cannot have a window-frame extent.
The ROWNUMBER(), ROW_NUMBER(), RANK(), DENSE_RANK(), DENSERANK(), LAG(), LEAD(), PERCENT_RANK(), CUME_DIST(), NTILE() window functions cannot be called if a window-frame extent is also defined for the window.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-25854 fires when ROWNUMBER(), ROW_NUMBER(), RANK(), DENSE_RANK(),
DENSERANK(), LAG(), LEAD(), PERCENT_RANK(), CUME_DIST(), or NTILE() is called
with a window-frame extent also defined — per the official guidance, these functions can't
have one.
- A window-frame extent defined alongside one of these functions, per the official guidance — the direct, only cause.
Solutions / Resolution
- Remove the window-frame extent from the window definition, per the official guidance.
Examples
N/A
No specific triggering statement is documented beyond a frame extent on one of these functions.
Diagnostic Checks
- Check the window definition for a frame extent (
ROWS/RANGE BETWEEN), and remove it if the function is one of this family.
Related Errors / Related Topics
- -25853 — "The ntile, lead, lag and ranking window functions require window order." A related restriction on the same function family, on requiring ordering rather than forbidding frame extents.
A row-numbering/ranking/LAG/LEAD/NTILE-family function had a window-frame extent
defined, which isn't allowed — remove it.