ctl file to remove duplicates [message #351008] |
Sun, 28 September 2008 23:18 |
swas_fly
Messages: 220 Registered: March 2008 Location: Bhubaneswar
|
Senior Member |
|
|
create table A_1
(
A1_CONK VARCHAR2(15) not null,
A1_KDM_FLG VARCHAR2(100),
A1_PRODUCT_GROUP VARCHAR2(30),
A1_CONTACT_NAME VARCHAR2(101),
A1_SPEAKER_FLG VARCHAR2(1),
A1_CUG VARCHAR2(200),
A1_ACTMGR_FLG VARCHAR2(1)
)
tablespace TBS_A
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 80K
minextents 1
maxextents unlimited
);
This is my table and i have a primary key on a1_conk.
the input feed that i am using has spaces on the column conk,hence duplicates are also getting inserted into the a1_conk field.
How can i remove the duplicates??
below is the input feed structure and ctl file
ctl file
OPTIONS(SKIP=1)
LOAD DATA
INFILE '/x.dat'
BADFILE '/x.bad'
DISCARDFILE '/x.dsc'
truncate INTO TABLE ACE2_2
FIELDS TERMINATED BY "~"
TRAILING NULLCOLS
(A2_CONK
,A2_KDM_FLG
,A2_PRODUCT_GROUP
,A2_CONTACT_NAME
,A2_SPEAKER_FLG
,A2_CUG
,A2_ACTMGR_FLG)
feed structure
CONK~KDM_FLAG~PRODUCT_GROUP~CONTACT_NAME~SPEAKER_FLAG~CUG~ACCOUNT_MANAGER_FLAG [EDITED by DJM: changed names as per 'Reported Message' request]
[EDITED by MC: changed names as per 'Reported Message' request once more]
[Updated on: Thu, 20 November 2008 01:05] by Moderator Report message to a moderator
|
|
|
|
|
|
Re: ctl file to remove duplicates [message #360206 is a reply to message #360201] |
Thu, 20 November 2008 01:20 |
|
Michel Cadot
Messages: 68728 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
We had completly removed confidential informations, the rest is safe, names like PRODUCT_GROUP or CONTACT_NAME are too common to be viewed as a danger for anyone.
Regards
Michel
|
|
|