How to update Table data with Excel data


I have data in Excel . these are latest data.

I want to update mysql table data with Excel data.

How do I do it ? Please guide

N.B: I use SQLYog , MySQLAdministrator tool to manage db work. Can these tool be of help for this work. how ?

import the excel data into a table, then update your main table from this imported table using a joined update

what is a joined update ? Do I need any tool to execute joined update ?

UPDATE items,month SET items.price=month.price


I want to add trim into query…

here is a bad query …like this

UPDATE items,month SET items.price=month.price

Can you please tell what would be the correct version of this ?

i have no idea

it all depends on how your tables are related

so far you have not revealed what your tables look like

It may not have much things to do with table structure.

I’m worried because of this …

suppose Excel data contains some SPACES …and after import this SPACE goes to the CELL.

I don’t want this extra SPACE damage my joined update query. …now I have two choices to get rid of this space…

(a) just need a TRIM to work …I asked the same for this …This could be a solution also.

(b) remove SPACE from the EXCELL cell itself so that after import into table there will no SPACE in the CELL… but unfortunately I don’t know how to remove SPACE from Excel cell …Do you know this ? This could be a solution also

well, in that case, i would use TRIM

you haven’t showed us any data where it didn’t work