If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > in mysql database,how to upload the modified data from csv file

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-14-11, 05:02
Junior43 Junior43 is offline
Registered User
 
Join Date: Jul 2011
Posts: 1
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?
Reply With Quote
  #2 (permalink)  
Old 07-14-11, 05:09
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
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?
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Tags
mysql db update

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On