RE: check duplicates before insert into a table

RE: check duplicates before insert into a table

 

  


What are you using the load the data, SQLPLUS, SQL*LOADER ...? What
version of ORACLE are you running?

If you are using ORACLE 9i you can load the external table into an
ORACLE table then use the merge command to do what you need.

If it's an external file you can use SQL*LOADER. This will place
rejected records, due to unique index constraint, into a separate file
that can be loaded into you duplicate table.


-----Original Message-----
From: Pfennich Petra
[mailto:oracledba-ezmlmshield-x19072333.[Email address protected]
Sent: Thursday, October 07, 2004 11:06 AM
To: LazyDBA Discussion
Subject: check duplicates before insert into a table


Hi,



can you please give me a hint,

I have to insert data from an external table into some internal tables.



How do I check, if the recordset isn't already in the internal db?

I have a unique index across 4 columns - if the recordset is already in
the db - I must insert this recordset into a table called DUPLICAT.



Thanks for your help.





--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html


Oracle LazyDBA home page