Solved

Can sql loader update existing records in a table ??

Posted on 2009-04-12
1
1,455 Views
Last Modified: 2013-12-19
I'm new to the bulk utilities of oracle.  I need to import records from a flat file.  Somtimes this file can contain records that may already exist in the database.  How do I deal with this ?
0
Comment
Question by:buckrodger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 25

Accepted Solution

by:
lwadwell earned 125 total points
ID: 24126940
Hi buckrodger,

No, SQL Loader just does inserts.  It supports four methods INSERT/APPEND/REPLACE/TRUNCATE:
The default is INSERT - which does just that, inserts the data, but expects the table to be empty first.
You can APPEND to the end of the table;
The final two are REPLACE and TRUNCATE.  With these the entire table will be erased before loading.

If you need to update existing data in a table from a file you can load the data into a another table first and then update the target table using a custom script or merge statement.

lwadwell
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question