Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: How to update datas in a script ?
Hi Bastiaan,
Thank-you very much for your answer.
Indeed, I need to have a procedure running
every day in order to insert or update the datas.
I am very interested in the example of code you could
give me !
Thank-you again for your answer.
Philippe.
Bastiaan Schaap a écrit dans le message ...
>Hi Philippe,
>
>It depends on how you want the job to be done. If you would like it to be
an
>automated (scheduled) job, because you know the new file will be at a
>location at a given time, I'd suggest you write some code in PL/SQL.
However
>if it is something that occurs only once a month, you'd probably could do
it
>by hand with de SQL*Loader. Looking at the logic you described the PL./SQL
>procedure would be very easy to build. I made a little procedure that does
>the same thing in about 20 lines of code. You could use the utl_file
utility
>to read the textfile. The difficulty of the procedure will depend on how
the
>data is represented within the textfile. If you need a code example, let me
>know...
>
>HTH,
>
>Bastiaan Schaap
>Oracle web development,
>Desyde BV - Baarn
>http://www.desyde.nl/
>tel. +31355411711
>
>
>
>Philippe Wolf <~~pwolf_at_ecritel.net> wrote in message
>news:8kcpbj$56h$1_at_news5.isdnet.net...
>> Hi,
>>
>> I receive every day a file containing data to add
>> to an existent database, on Oracle 8i.
>> The probleme is that I may update certain rows, so
>> that it's not a replacement.
>> Must I use PL/SQL, SQL Loader, java...?
>> A solution could be to read the file, line by line,
>> see if the record exists, update it if yes, or insert it if not,
>> but it could be long with some thousands or more of records
>> to inspect.
>> Could any one tells me how to do ?
>> Thank's for any help.
>>
>> Philippe.
>>
>>
>
>
Received on Tue Jul 11 2000 - 00:00:00 CDT