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: Wed, 07 May 2003 18:37:25 GMT
Message-ID: <Fncua.5263$3f7.4197908@newssvr28.news.prodigy.com>


"Guido Konsolke" <Guido.Konsolke_at_triaton.com> wrote in message news:1052300119.890218_at_news.thyssen.com...
> "Randy Harris" <randy.harris_at_nospam.net> schrieb im Newsbeitrag
> news:jnPta.4395
> > 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.
> >
>
>
> As I read the docs, SQL*Loader doesn't UPDATE existing records. It INSERTs
> into empty tables and APPENDs or REPLACEs / TRUNCATEs populated tables.
> Why do you think that a stored proc is no option. You can read the rows of
> the file
> using the UTL_FILE package and then do what Scott already posted.
>
> hth,
> Guido

It looks as though I might need to find a way to make a stored proc an option. Received on Wed May 07 2003 - 13:37:25 CDT

Original text of this message

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