Wrong Result Of Query Using Rownum And Inline View With Subselect And "Order By" (Doc ID 421953.1)

Last updated on MAY 31, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.2 to 10.2.0.3 [Release 10.2]
Information in this document applies to any platform.
This problem can occur on any platform.

Symptoms

Wrong Result Of Query Using Rownum And Inline View With Subselect And "Order By"

Query:


The number of rows returned by the query depends on whether rownum is included in the outermost
select list or not.
If rownum is included in the select list the clause "where sumnum < 0" of the inline view is not
satisfied.
This phenomenon only occurs if the "order by" clause and the "group by" clause and the clause
"where num = t.num' in the innermost inline select is included in the statement.


Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms