Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Adding changed records

Re: Adding changed records

From: Randy Harris <randy.harris_at_nospam.net>
Date: Tue, 06 May 2003 14:10:23 GMT
Message-ID: <jnPta.4395$3f7.3684069@newssvr28.news.prodigy.com>


"Guido Konsolke" <Guido.Konsolke_at_triaton.com> wrote in message news:1052201337.972863_at_news.thyssen.com...
> "Randy Harris" <randy.harris_at_nospam.net> schrieb im Newsbeitrag
> news:5iEta.4179$3f7.3486286_at_newssvr28.news.prodigy.com...
> > Is there a simple means, with either SQL*Plus or SQL*Loader, to UPDATE
> > records if they exist but INSERT if they do not?
> >
> > --
> > Randy Harris
> >
>
> Hi Randy,
>
> you don't give much information to play around with. Where are these
> records?
> What version of RDBMS or OS?
>
> Greetings,
> Guido

The Oracle 8i database will contain tables with customer information. I am to be given a comma delimited flat file, on a nightly basis, containing changes to the data. The changes will include both updated records and new records, with no hint as to which is which. I need to "synchronize" the changes into the database. I don't think a stored procedure is going to be an option, that's why I asked for advice on doing it with either sqlplus or sqlloader.

It seems to me that it would be clumsy with sqlplus. I would have to read in each of the lines from the cdf, then query to see if there was a matching record, then do either an UPDATE or and INSERT. I don't know much about sqlloader, but have been reading the documentation. I see that it can do either UPDATE or APPEND and discards records to a file. I thought perhaps there might be a mechanism in there somewhere. I was hoping that someone who has had experience in this area might get me started in the right direction. Received on Tue May 06 2003 - 09:10:23 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US