Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: !! URGENT - need Help !!

Re: !! URGENT - need Help !!

From: William Boyle <bboyle_at_netway.com>
Date: Sat, 24 Oct 1998 20:32:01 -0700
Message-ID: <36329BB1.5848@netway.com>


Mathias Dehm wrote:
>
> Hello,
>
> i have many tables in a O8-database which have duplicate entrys. This
> happens because the IMP80-tool runs twice for these tables. Until now, there
> are no constraints on this tables.
>
> An error occurs while creating an primary key because there are duplicate
> entrys.
>
> How can i delete these duplicate entrys from these tables ?
>
> Did anyone know an easy way to do this work?
>
> Thanks a lot
> Mathias

I would strongly suggest that you rename each table with a temporary name, then create the target table with the statement:

        create table <table-name> as select distinct * from <temp-name>;

Then drop the temporary table and add the key constraints/indices to the target table. The main down-side to this is that you need enought space for the original table + 50%. You will need to alter the syntax of the create statement shown in order to place the table in a specific tablespace.

-Bill Boyle Received on Sat Oct 24 1998 - 22:32:01 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US