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

Home -> Community -> Usenet -> c.d.o.server -> Re: ignore_dup_row or ignore_dup_key

Re: ignore_dup_row or ignore_dup_key

From: <markp7832_at_my-deja.com>
Date: Mon, 27 Sep 1999 22:57:24 GMT
Message-ID: <7sosoe$234$1@nnrp1.deja.com>


In article <7smpp0$294s$1_at_adenine.netfront.net>,   Norris <johnnie_at_cooper.com.hk> wrote:
> I need to insert a lot of data into a table and I want to filter out
duplicate records. Is it possible to create index with ignore_dup_row?
>
> --
> - Have several nice days...
> - Opinions are mine and do not necessarily reflect those of the Corp.
> http://www.ntfaq.com
> http://www.cyberport.com/~tangent/programming/winsock/
>

1) If your are on Unix system could you use sort -u to eliminate the duplicates before you start?
2) You can place the insert inside a pl/sql loop and code an exception block to ignore the error
  begin
   insert into table ....
  when dup_val_on_index then null ;
  end ;
3) Item #2 requires you have a unique index on the table --
Mark D. Powell -- The only advice that counts is the advice that  you follow so follow your own advice --

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Mon Sep 27 1999 - 17:57:24 CDT

Original text of this message

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