dbTalk Databases Forums  

Eliminate Duplicates Using SQLLDR and/or .ctl file

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Eliminate Duplicates Using SQLLDR and/or .ctl file in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
gilgantic
 
Posts: n/a

Default Eliminate Duplicates Using SQLLDR and/or .ctl file - 07-15-2003 , 08:09 AM






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

Reply With Quote
  #2  
Old   
tojo
 
Posts: n/a

Default Re: Eliminate Duplicates Using SQLLDR and/or .ctl file - 07-15-2003 , 09:13 AM






In article <d6052717.0307150509.33ee2a31 (AT) posting (DOT) google.com>,
gilgantic (AT) yahoo (DOT) com says...
Quote:
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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.