If you load your data into a table with an enable foreign key, it will be checked on the fly by SQL*Loader with the conventional path. In direct mode it disables constraints, and I am unsure whether it checks them when reenabling them (something which you can optionally get); any way it would let you with the manual check to do. If your CSV file is not in the million of rows or more range, I would go for SQL*Loader with the conventional path.
HTH SF >----- ------- Original Message ------- ----- >From: "Saira Somani-Mendelin" ><[EMAIL PROTECTED]> >To: Multiple recipients of list ORACLE-L ><[EMAIL PROTECTED]> >Sent: Thu, 14 Aug 2003 05:44:23 > >List, > >I have been given a csv file to load into an Oracle >table. This table >has no referential integrity constraints (it is >checked via the >application) so I could end up inserting a bogus >record. > >Is there any way for me to check for the existence >of a record in >another table while loading data using SQL*Loader? > > >Here's the process I use right now: > >Load records into a temporary table. >Query these records against the reference table. >If record doesn't exist, spool it into a file, give >it back to the BA, >get them to fix it, then go through the whole >process again until there >are no bad records. > >Seems like a roundabout way to do things - it >definitely works for me >but I just wonder if there is an easier way. > >Thanks in advance, >Saira > -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Stephane Faroult INET: [EMAIL PROTECTED] Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- 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).