473,796 Members | 2,640 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Eliminate Duplicates Using SQLLDR and/or .ctl file

Is there anyway of eliminating duplicate entries as the database loads data
using SQLLDR and/or .ctl (Control File)?

I use the following command line using SQLLDR and a control file to load my
data, but the sample.dat file has duplicate information. I would like to be
able to eliminate this, since I have know ability to manipulate the sample.dat.
${ORACLE_HOME}/bin/sqlldr $USERPW /home/sample/sample.ctl

############# sample.ctl ###############
OPTIONS (DIRECT=TRUE)
LOAD DATA
INFILE '/home/sample/sample.dat'
truncate
INTO TABLE SAMPLE
(
NAME position(01:32) char,
EMAIL position(33:65) char
)
############### ############### ##########

Thank You
Jul 19 '05 #1
1 10352
In article <d6************ **************@ posting.google. com>,
gi*******@yahoo .com says...
Is there anyway of eliminating duplicate entries as the database loads data
using SQLLDR and/or .ctl (Control File)?

I use the following command line using SQLLDR and a control file to load my
data, but the sample.dat file has duplicate information. I would like to be
able to eliminate this, since I have know ability to manipulate the sample.dat.
${ORACLE_HOME}/bin/sqlldr $USERPW /home/sample/sample.ctl

############# sample.ctl ###############
OPTIONS (DIRECT=TRUE)
LOAD DATA
INFILE '/home/sample/sample.dat'
truncate
INTO TABLE SAMPLE
(
NAME position(01:32) char,
EMAIL position(33:65) char
)
############### ############### ##########

Thank You

Can you manipulate the SAMPLE table? I would create a unique constraint
on the field(s) you don't want duplicated. The duped records from the
sample.dat would then land in your badfile.

-- Tom
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2253
by: joe bolton | last post by:
Can sqlldr append to a bad file instead of overwriting the file on every run?
3
3159
by: Tony Young | last post by:
Hi, I have a multimap container. I want to eliminate all "duplicate" elements. By duplicate I mean something like (3, 4), (4, 3) and (4, 3), in which I want to eliminate any two of these three. The most straightforward way I can think of is to first swap every member such that every member has its key smaller than its value. Then loop thru the multipmap and erase duplicates (please see the loop below). Is there a more automatic way...
1
1422
by: GB | last post by:
Hello: I have a table like this: ID | AccNo -------------------------------- 1 0059 2 0059 3 0059 4 0194 5 0194
3
2580
by: italia | last post by:
I have a database with 2 columns and more than million rows. The first column is the id Example of the data (2 columns)- 04731 CRM 04731 CRM 04731 CRM 04731 RVB 04731 RVB
0
1162
by: vsarangiri | last post by:
Is there a possibility to append in the bad file and discard file of a sqlldr instead of overwriting it. If so, how ?
1
1441
by: vsarangiri | last post by:
Is there a possibility to append in the bad file and discard file of a sqlldr instead of overwriting it. If so, how ?
5
36097
by: vshalpatel | last post by:
Hi I want to use SQL*Loader , an Oracle-supplied utility to load data from a flat file into one database tables. for this I have write the scripts in the SQL*LOADER control file named loader.ctl. actual data file is mydata.csv that I have mentioned under ‘load data’ section in loader.ctl . P.N : I am using my personal oracle installed on windows Pc. not using any n/w resources to access oracle DB Now I know we need to invoke...
1
282
by: gilgantic | last post by:
Is there anyway of eliminating duplicate entries as the database loads data using SQLLDR and/or .ctl (Control File)? I use the following command line using SQLLDR and a control file to load my data, but the sample.dat file has duplicate information. I would like to be able to eliminate this, since I have know ability to manipulate the sample.dat. ${ORACLE_HOME}/bin/sqlldr $USERPW /home/sample/sample.ctl ############# sample.ctl...
2
3317
by: ragonz | last post by:
im having trouble in executing sql loader command in php. i already posted this issue in php forum, but didn't give me clear answer yet. probably posting in this forum would be better. here's what i've tried : $cmand="sqlldr userid=system/pass control='control/data.dat'"; system($cmand); in php, we can see the result line. it works but only reached the header of the sqlldr command n it suddnly stopped. what should i do then?
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10021
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9061
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7558
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6800
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5453
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2931
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.