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

Home -> Community -> Usenet -> c.d.o.server -> Removing dublicate records in table and hostarray

Removing dublicate records in table and hostarray

From: Brian Rasmusson <br_at_belle.dk>
Date: Thu, 23 Apr 1998 16:31:41 +0200
Message-ID: <353F50CD.254A5D87@belle.dk>


Hi,

I have a tricky problem that i would like to discuss.

Imagine this scenario:

Table X contains transactions, and may contain dublicates. Table Y contains the processed transactions, and no dublicates may exists. This is handled by having a primary key that the raw transactions does not have.

Several machines deliver transactions to the master, placing them in table X. My application reads the transactions, and inserts them into the destination table Y after processing. If an insert of one transaction fail, i simply roll back.

Now, i would like to optimize this. I now read 1000 transactions into a hostarray. I now want to do something like a FOR :number_of_records_in_hostarray delete from table Y where keycol1=:k1 and keycol2=:k2 so i _know_ that i can insert the remaining records in one large bulk insert.

Any suggestions on how to do this?

Thanks in advance,
Brian


Brian Rasmusson, Software engineer & analyst        e-mail: br_at_belle.dk
Belle Systems A/S                                   web   : www.belle.dk
Network, Internet and communication specialists     phone : +45 59442500

------------------------------------------------------------------------
Received on Thu Apr 23 1998 - 09:31:41 CDT

Original text of this message

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