Re: Updating a table w/PRO*C

From: Kevin Neel <k-neel_at_nwu.edu>
Date: 28 Jan 1994 23:01:20 GMT
Message-ID: <2ic5g0$aj8_at_anaxagoras.ils.nwu.edu>


In article <CKCz8J.J22_at_amiserv.chi.il.us> Andrew Ryan, genanr_at_amiserv.xnet.com writes:
>I need a way of taking each record and if a key exists in the database
>update the fields in the table, otherwise insert the whole record.

If you don't need to preserve fields as they exist in the database (i.e. if all columns get their values from the flat file), you could do an array delete followed by an array insert of all rows. Might be expensive if you have mostly updates (rather than inserts) to do.

It would be nice if you could do an array update, get back the number of rows updated for each element of the array, and use that information to determine which inserts to do. Unfortunately, I don't think that you can get that kind of detail back. Received on Sat Jan 29 1994 - 00:01:20 CET

Original text of this message