Jump to content

Recommended Posts

I exported the csv file to database successfully.Here is the command I have used:

 


LOAD DATA LOCAL INFILE 'C:\\Book2 DATABASE.csv'
INTO TABLE dataparsing.inventory
FIELDS TERMINATED BY ',' ENCLOSED BY '"'
LINES TERMINATED BY '\r\n' (fund,process,tool_id,manufacturer,model,description,in_production,serial_number,loc_ref,wafer_max,wafer_min,new_price,price_min,price,image1,image2,image3,image4,purchase_from,purchase_date)
//with the new csv sheet I hav eto change price fro almost all the tool.

 

But later on there were some changes and now have a new csv sheet.Now I dont know to modify .I cannot delete the tools as they have unique ids generated sequentially

 

 

I can run update command but it would be a waste of time.

 

Is there a way I can make a check so that if the inventiry id exist it should only populate the fields in database?

 

Best

Divya

Link to comment
https://forums.phpfreaks.com/topic/142673-help-with-exporting-csv-file-to-mysql/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.