Solved

Can sql loader update existing records in a table ??

Posted on 2009-04-12
1
1,373 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
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

Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Creating and Managing Databases with phpMyAdmin in cPanel.
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

930 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now