By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,806 Members | 1,506 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,806 IT Pros & Developers. It's quick & easy.

"update" mysql table

P: 1
I have a csv file that is updated daily through an automated process and adds the new data to the end of the document. I need to find a way to "update" the MySQL table without having to truncate the table then LOAD DATA LOCAL INFILE every time. Is there an "update" command that can pull the newly added data from the spreadsheet and "insert" it into the existing table?
Any help would be great
Thanks
Jared
Sep 2 '11 #1
Share this Question
Share on Google+
1 Reply


code green
Expert 100+
P: 1,726
Maybe a two step process?
Use LOAD DATA LOCAL INFILE (although I have never used this) to import the data into a temporary table.
Then use INSERT INTO ..... ON DUPLICATE KEY UPDATE query to update the main table
Sep 8 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.