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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Remove duplicates

Re: Remove duplicates

From: Alexei Olkhovskii <aolkhov_at_messages.to>
Date: Tue, 13 Mar 2001 21:37:57 -0800
Message-ID: <3aaf04c1@news.infinetgroup.com>

nick <nick-love_at_juno.com> wrote in message news:tar1hjh7b7tcaf_at_corp.supernews.com...
>
> xiaomh wrote:
> > I want to import 10000 entries to my database. There are some
> > duplicates in them. What's the best way to remove them(duplicates)?
> select distinct column_name from table;

Sorry, missed the original post.
I think, you may consider loading the data to table, and then add a unique constraint with EXCEPTIONS INTO clause. Example from SQL reference:
  ALTER TABLE census
    ADD CONSTRAINT unq_city_state UNIQUE (city, state)     USING INDEX PCTFREE 5 TABLESPACE user_y   EXCEPTIONS INTO bad_keys_in_ship_cont;

The EXCEPTIONS INTO clause causes Oracle to write information to the bad_keys_in_ship_cont table about any rows currently in the census table that violate the constraint.

Best regards, Alexey
.. A conclusion is simply the place where someone got tired of thinking Received on Tue Mar 13 2001 - 23:37:57 CST

Original text of this message

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