Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Date Time PS/SQL

Date Time PS/SQL

From: swaxolez <mvsunstar_at_yahoo.ca>
Date: 25 Jul 2006 10:34:06 -0700
Message-ID: <1153848846.416935.272060@i42g2000cwa.googlegroups.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US