real_illusions Posted December 17, 2009 Share Posted December 17, 2009 Hi all,I have a mysql database with some values in, some rows arent filled out as the data required for them were missing. Once we get this data, is there an easy to put this into the database without doing it one by one by hand. Need an SQL statement ideally to stick into phpmyadmin to do this.One field is an unique identifier (although its not an auto increment id thingy) each value in there is different and the field we can target to fill out the missing fields.The data is most likely going to arrive in an excel file, so is there a way to getting that data from the file thats missing from the database, and matching it up where it all belongs?Does any of that make sense?I guess its a where id# is (for example) 12, update this other field with this value, but repeated alot more times and with different id# and values for the other fields.Any would be appreciated. Link to comment Share on other sites More sharing options...
justsomeguy Posted December 17, 2009 Share Posted December 17, 2009 I usually use a script to process the spreadsheet. If you're just uploading a spreadsheet to phpMyAdmin or something you can't really tell it which query to run, it will just run through all of the records and try to insert them. If you want to run special queries you'll probably want to use a script to process it. This may be useful:http://dev.mysql.com/doc/refman/5.0/en/ins...-duplicate.html Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.