Oracle - SQL - update sequential number based on order by clause
590513Aug 6 2007 — edited Aug 6 2007I 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?