Re: load and unload and update
Posted in 1994
FWIW, I have a situation where I have to update a customer/address database with the output from a (non-informix) accounts package. The way I do it is: create 2 temp tables one with the same schema as the customers table, the other with the same schema as the addresses table. Then, first for customers, then addresses I remove all records in the live table not in the temp table insert all records in the temp table not in the live table update all records in the live table with data from the temp table In this case the data in the temp tables has priority and nothing should be in the live database that isn't in the transfer files. Doing things in this way means that you don't get duplicate record errors 'cos you're only inserting stuff that isn't there. I hope this helps. ---------------------------------------------------- These opinions are mine; if you want them, take them ---------------------------------------------------- Stuart Hemming | shemminga@cix.compulink.co.uk The Data Base | +(44) 115 925 0005 Nottingham UK | ----------------------------------------------------