Home » RDBMS Server » Server Utilities » ctl file to remove duplicates (oracle 10g)
ctl file to remove duplicates [message #351008] Sun, 28 September 2008 23:18 Go to next message
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 #351139 is a reply to message #351008] Mon, 29 September 2008 08:12 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
http://www.orafaq.com/forum/t/25692/0/
Re: ctl file to remove duplicates [message #360199 is a reply to message #351008] Thu, 20 November 2008 01:03 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Is this renaming good enough or do you want the whole thread deleted?

David
Re: ctl file to remove duplicates [message #360201 is a reply to message #360199] Thu, 20 November 2008 01:07 Go to previous messageGo to next message
swas_fly
Messages: 220
Registered: March 2008
Location: Bhubaneswar
Senior Member
Hi

please send a private message david.as it is a concern now for me
kindly delete the whoel thread as many descriptions and informations are still searchable in google.

This is a due request.

Thanks

[Updated on: Thu, 20 November 2008 01:11]

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 Go to previous message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
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
Previous Topic: errors while impdp
Next Topic: Export reduced database size.
Goto Forum:
  


Current Time: Thu May 02 15:37:07 CDT 2024