Re: SLQ loader --> SQL updater

From: Mark Gumbs <mgumbs_at_nospam.hotmail.com>
Date: Wed, 2 Jun 1999 11:17:21 +0100
Message-ID: <3755026b.0_at_145.227.194.253>


[Quoted] I'm not sure if there is something out there already but....You could always write one!

I'm serious! After all, sql*loader issues a load of insert statemens in its simplest mode.

Theory goes that you have lines in a text file, say, table_name, field_to_be_updated, new_field_value, where_condition.

If the where condition is constant (where id = ???) then just give the ID. The id could be some primary key etc.

Use UTL_FILE to read each line from the csv file, separate the fields and issue an update statement using dbms_sql to send to the database.

Hmmm....i feel a money making venture comming on ;-)

M

Ari Peltoniemi wrote in message <3754EF4F.CA7E7145_at_hex.fi>...
> HI
>
>Does anyone know is there a program like SQL Loader but instead of
>insert it should do an update. ?
>
>You could write a ctl file and then just run something like
>"sqlldr-updater CONTROL=foo.ctl DATA=etc.dat ...."
>Program should do an update on the the row instead of insert. If the row
>in the file does not exist in the database in that case it should do an
>insert. Otherwise the same functionality that SQL loader has....
>
>Thanks, Ari
>
Received on Wed Jun 02 1999 - 12:17:21 CEST

Original text of this message