I have a table which has approx. 10,000 client records.
The table structure look like this:
ClientID | FirstName | LastName | PhoneNumber
I am trying to update the PhoneNumber column with a updated Excel file,
which only has two columns, ClientID | PhoneNumber
My cpanel has phpmyadmin installed, but how do I import the excel file into the database and only update the PhoneNumber based on ClientID?
Thank all!
解决方案
I don't know if that's possible, but you can easily use the excel spreadsheet to generate a series of MySQL commands to update the phone number. If the ID is column A and the phone number is column B, then the function would just be:
concatenate("update yourTableName set phonenumber = '", A1, "' where ID = ", B1, ";")
Then fill down and copy the resulting commands into PHPMyAdmin's SQL tab.