mark_roach

msg:4370541 | 12:28 pm on Oct 4, 2011 (gmt 0) |
I think this will work but have not checked the syntax : update tablea, tableb set tablea.cola=tableb.cola where tablea.colb=tableb.colb
|
mark_roach

msg:4370546 | 12:37 pm on Oct 4, 2011 (gmt 0) |
Just realised you have the data in a seperate database. Never done this but I think the following should work : update db1.table, db2.table set db1.table.cola=db2.table.cola where db1.table.colb=db2.table.colb If ir doesn't just dump the table you need from the backup using mysldump and then import it into the original database using a different name and use the SQL in my first post.
|
wheel

msg:4370558 | 1:04 pm on Oct 4, 2011 (gmt 0) |
Make backups first huh? :) Thanks, I'll give it a whirl. Firstoption looks the most promising.
|
whoisgregg

msg:4370742 | 8:32 pm on Oct 4, 2011 (gmt 0) |
You're probably going to want to learn the "INSERT INTO ... SELECT" syntax: http://dev.mysql.com/doc/refman/5.1/en/insert-select.html [dev.mysql.com]
|
|