Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Date Time PS/SQL
I'm sure this is a very obvious solution but I'm having trouble
organizing this problem.
I have a database with date/time field.
Each record looks like this:
Scanned_DateTime,Passkey,Last_Scanned_DateTime,TimeDifference
When I import these records using sql*loader I assume I can set up a trigger and procedure to go through the whole database (to compare against previous records already stored there) and compute the two fields listed above "Last_Scanned_DateTime" and "TimeDifference" as they apply to each unique passkey. So that each record will contain the time the passkey was intially scanned and the last time and time difference of the previous scan.
Is there a faster way then doing a sequential scan from beginning to end of the entire database to achieve this? I expect this database to contain millions of records. I'm just beginning Oracle and am not quite sure on the PS/SQL coding.
Any help or pointers would be appreciated. Received on Tue Jul 25 2006 - 12:34:06 CDT