Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: ignore_dup_row or ignore_dup_key
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
![]() |
![]() |