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 -> Sqlldr Query

Sqlldr Query

From: Ian <ian_stephenson(_at_)hotmail.com>
Date: Thu, 9 Sep 2004 11:56:44 +1000
Message-ID: <413fb8c1@derwent.nt.tas.gov.au>


Hallo,

I am having trouble with the functionality of the sqlldr utility, specifically in regards to the insert, append, truncate, delete options.

Task: Using sqlldr to update a number of tables from comma delimited files. This will happen on a daily basis. The comma delimited files contain new and updated record entries. The source data is from another transaction system which does not have a odbc driver available, hence daily extracts which are then ftp'd to the Oracle database server for update to the database which is used for reporting.

Problem: Using append the new records are added however any record which is already in the database is discarded due to the primary key constraint. Using either truncate or delete blows away all records in the existing Oracle table leaving only the records from the upload in the table and the requirement is to keep all existing records + any new and updated records.

Required behaviour: I would like all the records to be appended (new) and updated for those records which already exist in the database as one or more fields will have changed from the source transaction application.

Thanks in advance for any helpful suggestions.

Regards,
Ian Received on Wed Sep 08 2004 - 20:56:44 CDT

Original text of this message

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