Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle 8 updates from flat files - how
Greg,
We have done this using the UTL_FILE utility for the read, and attempting to
insert the record using a standard INSERT. In the EXCEPTIONS section, we
specify WHEN DUP_VAL_ON_INDEX and do an UPDATE in that case... in our case
it worked and performed pretty well. Good luck.
Tim Twombly
Stride Rite Corp.
Greg Drew wrote:
> I have an Oracle8 database which needs to be periodically updated with
> records pulled from an ASCII flat file provided by an external source.
> I've about gone blind perusing the SQL*Loader documentation, and can
> only find ways to append new records. Unfortunately, the file contains
> both new records and updates to existing ones. I can of course write
> code to parse the data and then query the DB to find out if the record
> exists, and then insert or update as appropriate, but my intuition tells
> me that there must be a better way. Does anyone have any ideas?
> --GDD
Received on Tue Dec 22 1998 - 20:58:57 CST