| Previous | Next |
| QUERY_E_AGGREGATE_NOT_SUPPORTED | QUERY_E_DUPLICATE_RANGE_NAME |
QUERY_E_TOP_LEVEL_IN_GROUP
QUERY_E_TOP_LEVEL_IN_GROUP is a hierarchy error in GROUP ON ... OVER. ORDER IN GROUP customizes ordering for a named group within a parent grouping level; the top-level group has no parent group and therefore cannot use that form.
Move group-specific ordering to a nested grouping level
- Print the generated grouping tree with nesting levels rather than inspecting the SQL as one line.
- At the top level, use the supported
ORDER BYrules for groups. - Use
ORDER IN GROUPonly where the named group exists inside an enclosing group result.
Windows Search grouping returns a hierarchical rowset and supports nested GROUP ON statements. Microsoft distinguishes default group ordering, ORDER BY, and ORDER IN GROUP BY for applying different ordering rules to particular groups. A generic tree-to-SQL serializer should validate the parent relationship before emitting the group-specific clause.
GROUP ON ... OVER · Windows Search SQL overview · Legacy query errors
Looking for a different code? Search another status or error code.