By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,855 Members | 1,970 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,855 IT Pros & Developers. It's quick & easy.

Eliminate Duplicates Using SQLLDR and/or .ctl file

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.