Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle - SQL - update sequential number based on order by clause

590513Aug 6 2007 — edited Aug 6 2007
I have a procedure that inserts records in to a temporary table. After procedure execution, I want to update a field in the temp table (recno) with sequential number ordered by a field audit date which is a time stamp field



For example, after updating the recno field, if I give a query like below,



Select recno,audit_timestamp,<other fields> from audit_details

order by audit_timestamp





the output should display recno in the sequential order. Can any one guide me on how to achieve this using a SQL query?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 3 2007
Added on Aug 6 2007
4 comments
2,101 views