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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: de-dup process

Re: de-dup process

From: Alan J. Gagne <alan.gagne_at_comcast.net>
Date: Thu, 14 Dec 2006 07:30:34 -0500
Message-Id: <1166099434.6489.7.camel@linux0.dbonenet.com>


I haven't tried this with large data sets but it may be worth trying. Create the unique key then oad your data using the external table feature and use the new log error feature from an insert statement to catch the dups.

Alan

CREATE TABLE raises (emp_id NUMBER, sal NUMBER

   CONSTRAINT check_sal CHECK(sal > 8000));

EXECUTE DBMS_ERRLOG.CREATE_ERROR_LOG('raises', 'errlog');

INSERT INTO raises

   SELECT employee_id, salary*1.1 FROM employees    WHERE commission_pct > .2
   LOG ERRORS INTO errlog ('my_bad') REJECT LIMIT 10;

SELECT ORA_ERR_MESG$, ORA_ERR_TAG$, emp_id, sal FROM errlog;

ORA_ERR_MESG$ ORA_ERR_TAG$ EMP_ID SAL
--------------------------- -------------------- ------ -------
ORA-02290: check constraint my_bad 161 7700

--

http://www.freelists.org/webpage/oracle-l Received on Thu Dec 14 2006 - 06:30:34 CST

Original text of this message

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