Re: Does A Data Update Script Tool Exist?
Posted by: Rick James
Date: September 05, 2014 10:04PM

What is the UPDATE statement supposed to do?

If you mean that the table already has about 1200 rows and the csv contains many of the same rows, but with new data, then I recommend...

1. CREATE TABLE New LIKE Real;
2. LOAD DATA the CSV into New.
3. Clean up anything in New that needs cleaning up.
4. Check that the data in New looks good.
5. Atomically swap tables:
RENAME TABLE Real TO Old, New TO Real;
6. Drop the old table (or hang onto it until later):
DROP TABLE Old;

If the columns of the CSV and the Real table are not identical, then you may need some more instructions around step #3.

Note that UPDATE is not needed.

Options: ReplyQuote


Subject
Written By
Posted
Re: Does A Data Update Script Tool Exist?
September 05, 2014 10:04PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.