I'm a complete newcomer to this kind of thing, hence the simple question, but I have 2 copies of a database table which I need to combine somewhat.
Both have the exact same structure and contain member account usernames and details. In one column in table_1 - screen_name, the data has been truncated, so I need to replace this with the data in the same column in table_2, which is an older backup of the same table. I'm going to repeat for a few columns, but first, I'm trying to replace the truncated screen_name.
I'm guessing it should be pretty simple, but I just can't get it to work. There are only about 4000 rows - the only potential complication is that table_1 has more records than table_2 (it's a newer version, and more members have registered since then), so the column itself can't be completely replaced by the older backup.
Here's what I've tried, but it doesn't seem to be working (getting a syntax error, apparently):
UPDATE exp_memberscorrupt
SET exp_memberscorrupt.screen_name = exp_membersclean.screen_name
JOIN exp_membersclean
JOIN exp_memberscorrupt on exp_membersclean.member_id = exp_memberscorrupt.member_id
Any ideas at all?