Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2011
    Posts
    1

    Unanswered: in mysql database,how to upload the modified data from csv file

    Initially, I created a database called "sample" and updated the data from massive size CSV file.

    Whenever I have small changes in .csv file (some data are added/deleted/modified), I have to update this in database too. Always updating the entire .csv file (large) is not efficient.

    Is there any efficient way to update the modified data from .csv file to database?

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by Junior43 View Post
    Is there any efficient way to update the modified data from .csv file to database?
    nope, sorry

    you will have to upload it, even if it's to a "upload" table which you then compare row by row to your main table to see what the differences are

    why are you making changes in the csv? you should be making them to your main table

    i guess i could turn the question around and ask you, if you made changes to the csv, but also kept a copy of the original csv, how easy is it for you to compare the two csv files and keep only the changed rows?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •