Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: BUG: Row_Number() - Help with a test case
Hi all,
I am an idiot, please disregard this. Obviously the error occurs because of the indeterminacy of row_number() when more than one record are ranked the same with respect to the ordering of the partition.
Can't believe it took me so long to see that.
cheers,
Anthony
Hi All,
I've posted this on the OTN forums but haven't had much help, so apologies to anyone who's already seen this.
We've come across a bug in our 10.1 instances when selecting from a view which uses the ROW_NUMBER() function. I'd like to produce a small test case to send to our DBA's. I've searched Metalink and have not found any bugs which relate to this behaviour.
I've distilled the situation into as small a test case as I can produce. I'd be grateful if some people here could cast their eye over it and tell me:
The situation may be summarised as follows: a table T with an ID column (not nullable, non-unique), some kind of flag column (in this case called CLOSED), which is nullable, and a date field used for ordering the partitions.
After creating and analyzing the test table, running a query of the form:
with v as (
select closed
, row_number() over (
partition by id order by some_date desc
-- http://www.freelists.org/webpage/oracle-lReceived on Tue May 08 2007 - 01:53:13 CDT
![]() |
![]() |