I have not done it but you should be able to capture records into an
exception table.

1. Create exception table
create table exceptions(row_id rowid, 
                         owner varchar2(30), 
                         table_name varchar2(30), 
                         constraint varchar2(30)); 
  
 The script UTLEXCPT.SQL located in home/rdbms/admin directory will create 
 this table for you. 
  
2. Capture records in violation into your created exceptions table
 ALTER TABLE.....EXCEPTIONS INTO OWNER.EXCEPTIONS


Rick
-----Original Message-----
Sent: Friday, September 07, 2001 8:41 AM
To: Multiple recipients of list ORACLE-L


Good Morning,

I am selecting information from 3 tables and inserting it into a new table.
My compound primary key is composed of:
  DODAAC       VARCHAR2(6)
  NSN              VARCHAR2(13)
  CONTRACT    VARCHAR2(14)

The results BEFORE I put the PK on the INSERT resulted in about 650,000
records. After I put the PK in I am getting:
ORA-00001: unique constraint (SHOPPINGSA.SCAN_CONTRACT_PK) violated

How do I find the bad data ???


TIA

Al Rusnak
804-734-8453
[EMAIL PROTECTED]
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Rusnak, George A.
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Cale, Rick T (Richard)
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to