Informix Error -25858: DISTINCT aggregate can not have ORDER BY clause or window frame extent.
Cause and resolution
DISTINCT aggregate can not have ORDER BY clause or window frame extent.
When DISTINCT is specified in OLAP aggregate functions the window function cannot have ORDER BY clause or window frame extent.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-25858 fires when an OLAP aggregate function specified with DISTINCT also has a window
ORDER BY clause or a window-frame extent — per the official guidance, a DISTINCT
aggregate can't have either.
- A
DISTINCTOLAP aggregate combined with a windowORDER BYclause or frame extent, per the official guidance — the direct, only cause.
Solutions / Resolution
- Remove the window
ORDER BYclause and any frame extent from theDISTINCTaggregate's window definition, per the official guidance.
Examples
N/A
No specific triggering statement is documented beyond a DISTINCT aggregate with
ORDER BY/a frame extent.
Diagnostic Checks
- Check whether the
DISTINCTaggregate's window definition hasORDER BYor a frame extent, and remove them.
Related Errors / Related Topics
- -25857 — "Invalid usage of DISTINCT aggregate in this context." A related
DISTINCT-aggregate restriction, on which aggregate functions supportDISTINCTat all.
A DISTINCT OLAP aggregate had a window ORDER BY clause or frame extent, which isn't
allowed — remove them.