I have a table, having 100 records and primary key column.
Now i want to upload 10 more records.before start importing data i disable primary key and import the records .

After import when i enable primary key , i am having error msg
some records r dulicate.

Now with out any query is there is any way to get dulpicate records?

Thanks in advcane!!

Hi Gaurav,

You need to use an inner-join query to pull out the duplicate records and get some decisions about (a) removing the duplicates; of (b) create new entries for the duplicate (so that their entries are unique).

This depends on the business rules, needs and requirements.

The inner-join query on your table would look something like this:

  your_table A
  rowid >
    (select min(rowid) from your_table B
        b.key1 = a.key1
        b.key2 = a.key2

where in this example, key1 and key2 are the 2 primary keys in your_table. If you have more PK, then add them to the sub select query.

I hope this helps you to find the duplicates.



All Answers

Answers by Expert:

Ask Experts


Peter Choi


I am a senior Oracle DBA, PeopleSoft HCM specialist and Project Manager with 15+ years experience. I have been working with PeopleSoft (HRMS/HCM 5, 7, 7.x and 8.9, 9.x), Oracle RDBMS (7.3 - 11gR2) on various Unix and MS-Windows platforms, and some Oracle Application Server (9i - 11gR1). I also have experience with the configuration and administration of PeopleSoft's Internet Architecture (PIA) and the Oracle 11g Fusion Middleware and Oracle Business Intelligence (OBI).

©2017 All rights reserved.