Home » RDBMS Server » Server Utilities » urgent..
urgent.. [message #69093] Sun, 28 October 2001 21:07 Go to next message
madhuri
Messages: 12
Registered: August 2001
Junior Member
hi,I am using Oracle SQLLoader utility. My requirement is I need to read records from .dat file and
insert into the table. I could able to insert the records. But, before inserting each record I need to check whether similar record already exists in the table.
If not then only insert the record or move to the next record in the .dat file.
So, how can i achieve this ?
I couldnt find any 'Select' statement in sqlloader utility. Plz help me on this regard.
rgds,
madhuri

----------------------------------------------------------------------
Re: urgent.. [message #69098 is a reply to message #69093] Tue, 30 October 2001 10:21 Go to previous messageGo to next message
oraboy
Messages: 97
Registered: October 2001
Member
load all records into a temp table
and write a pl/sql prog to check each record's (in Temp table ) existence in target table. Insert only those records which are not present

Regards
oraboy

----------------------------------------------------------------------
Re: urgent.. [message #69101 is a reply to message #69093] Tue, 30 October 2001 10:32 Go to previous messageGo to next message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
write control file with APPEND option. Oracle automatically rejects records if you specify integrity constraint(primary key) on the table.

SURESH

----------------------------------------------------------------------
Re: urgent.. [message #69109 is a reply to message #69093] Thu, 01 November 2001 00:20 Go to previous message
Ifigenia
Messages: 6
Registered: November 2001
Junior Member
Use primary keys in your tables. Dublicates will not be inserted in this case.
or write PL/SQL code that checks if records exist, an if /else loop will usually do the job.

----------------------------------------------------------------------
Previous Topic: Re: Net Service Name
Next Topic: Re: oracle dba papers
Goto Forum:
  


Current Time: Thu Mar 28 20:41:29 CDT 2024