473,805 Members | 2,137 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 10354
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
2254
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
2582
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
3318
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
9718
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
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10613
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10363
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10368
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7649
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
6876
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();...
1
4327
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3008
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.