Referring to this question, no solution/answer was given for Oracle platform.
Selecting Nth Record in an SQL Query
No sort or group or where clause. Order as per inserted record.
Reason for this, my application log stated that record no 7,34,46 are throwing error. Is there any correct way to archive this?
Thx in advance.
As far as I can tell, the accepted answer from that link is (almost) perfectly valid for Oracle:
Oracle has an analytic function ROW_NUMBER() that follows this syntax. I changed the single quotes to double quotes for the column alias, but I think everything else is good.
UPDATE:
As far as retrieving Nth record based on insertion time, you cannot rely on Oracle to maintain the insertion order for you. If you do not specify a sort order, there’s no guarantee what order your results are going to come back in. If you have a primary key that is always populated by a sequence, that could be used to order by. Alternatively, you could populate a timestamp column upon insertion and use that to order by. Long story short, you can’t have a meaningful Nth record query without specifying a sort order.