February 3rd, 2014, 05:20 AM
Update live table with the back up
I got my backup table (Commlogin_Buckup) in mysql database with my live database (Commlogin)
Now as my live database is missing records in column batch, I want to insert the missing records were my Id key is equal to each other now I ran a script that I wrote but, I see that a lot of the records in Batch updated as ' ' Empty field??? When I Look at the original backup table the information is there?
What I'm I doing wrong?
UPDATE commlogin INNER JOIN commlogin_Backup ON commlogin_Backup.id = commlogin.id SET commlogin.batch = commlogin_Backup.batch
February 8th, 2014, 01:31 PM
Double check that your join condition is correct.
If there isn't a match (possible whitespace characters) the original value, which I'm assuming is the blank string, will not be changed.
February 14th, 2014, 05:09 AM
Thank you, I saw my mistake.