Home » SQL & PL/SQL » SQL & PL/SQL » Inserting duplicate records (10.2.0.2 solaris 9)
Inserting duplicate records [message #350859] Fri, 26 September 2008 14:20 Go to next message
varunvir
Messages: 363
Registered: November 2007
Senior Member
Hi Experts,
I am trying to insert some rows in a table and i am
getting following erro:-
ORA-00001: unique constraint (BV7PROD.CT_BPC_RESOURCE_PRICIN_KEY_IDX) violated
So now If I make this index as non unique index then after
inserting the records,will I be able to make  it
Unique Index again??
Regards,
Varun Punj,
Re: Inserting duplicate records [message #350864 is a reply to message #350859] Fri, 26 September 2008 14:32 Go to previous messageGo to next message
Michel Cadot
Messages: 64140
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Of course no, if you have duplicates you can't create a unique index, otherwise if would not be a unique index.

Regards
Michel
Re: Inserting duplicate records [message #350868 is a reply to message #350864] Fri, 26 September 2008 14:50 Go to previous messageGo to next message
varunvir
Messages: 363
Registered: November 2007
Senior Member
Thanks Michel.So should I truncate the table as data is not
required and then insert
the rows from table in the other database with DB link.
The other option is dropping the table and then 
using impdp I can do it.But it is production db,I dont want to
drop table and then import it.What do you suggest Should I
insert the data by creation db link or should I use
impdp.
Regards,
Varun Punj,
Re: Inserting duplicate records [message #350870 is a reply to message #350868] Fri, 26 September 2008 15:00 Go to previous messageGo to next message
Michel Cadot
Messages: 64140
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
If you no more want the current rows then truncating the table is a good option.

Regards
Michel
Re: Inserting duplicate records [message #350909 is a reply to message #350868] Sat, 27 September 2008 07:00 Go to previous message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Why do you think you need to drop the table in order to being able to import?
Previous Topic: Triggers
Next Topic: ora-30929 error inspite of having a connect by clause
Goto Forum:
  


Current Time: Fri Dec 09 03:50:39 CST 2016

Total time taken to generate the page: 0.20293 seconds