Hi!
Is there a tool available that allows me to read data from a comma-delimited
flat file into Oracle and if a row already exists, updates that record. If
the row does not exist, it should insert a new record into the table.
Looks to me like SQL*Loader can't do this.
How could this be done?
Helmut, have you thought about using UTL_FILE package?
-Original Message-
Sent: Wednesday, March 28, 2001 2:37 PM
To: Multiple recipients of list ORACLE-L
Hi!
Is there a tool available that allows me to read data from a comma-delimited
flat file into Oracle and if a row already
Can you have a before-insert trigger on your table to do whatever you want
and then use conventional sqlldr to load it?
winnie
"Helmut Daiminger" [EMAIL PROTECTED] on 03/28/2001 12:38:10 PM
Please respond to [EMAIL PROTECTED]
To: "Oracle DBA List \(Lazy DBA\) \(E-mail\)" [EMAIL
Helmut,
Use SQLLOADER to load the file into a temporary table. Then write a
script/procedure to scan the contents of temporary table, compare this info
with base table, if row exists, update, else insert.
IMME (In my modest eperience) this is the easiest way.
HTH Some
Raj
You can't query or modify the same table as the trigger is firing on (The old mutating
table problem). What you could do is set up a temp table with a before insert trigger
which would query the other table and take the appropriate actions, this would solve
you having to run a separate