Import problems

[expired user #10304]'s profile image [expired user #10304] posted 7 years ago in General Permalink

I have a spreadsheet of our product pricing table and would like to increase our prices in the spreadsheet and then import the csv into our table to update the database with the new pricing. The table is very simple like- product_type,product_id,quantity,price

1,1,1000,8.28

1,1,500,8.29

1,1,300,8.31

1,1,100,8.32

1,2,1000,4.29

1,2,500,4.31

1,2,300,4.32

1,2,100,4.33

Every time I try to import this csv with REPLACE (duplicates) checked all it does is add the new lines. How do I get this to make the changes to just that last column? What am I missing?

kalvaro's profile image kalvaro posted 7 years ago Permalink

From your description, HeidiSQL is doing exactly what it's meant to do: import data. If you need to do complex manipulations in a database you'll have to learn some SQL or find a programmer who can do it for you.

Side note: if your table happily accepts duplicates it's probably missing the appropriate unique constraints, most likely the primary key.

Please login to leave a reply, or register at first.