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: Copy with PK problem in oracle 9i

Re: Copy with PK problem in oracle 9i

From: Gabriel Gonzalez <no-spam_at_no-spam.com>
Date: Thu, 27 Feb 2003 12:32:12 -0800
Message-ID: <6_OdnUyeVO_26MOjXTWcjg@giganews.com>


You could do it in a PL/SQL block, if you do it record-by-record. Something like this (this is not code!):

begin

    <create a cursor to traverse your source records>     while successfully retrieve source record

        try
            insert source record into destination table
        exception
            // do nothing, just skip record
        end;

    end while;
end;

The bottom line is you ignore the exception while inserting records. Maybe you just want to ignore the primary key violations and pay attention to all the other types of exceptions. Received on Thu Feb 27 2003 - 14:32:12 CST

Original text of this message

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