Last active
January 4, 2016 07:49
-
-
Save montogeek/8591575 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select personas_23_dic.updated_at as OLD, personas.updated_at as NEW | |
from personas_23_dic | |
join personas | |
where personas_23_dic.id = personas.id | |
and DATE(personas.updated_at) = '2013-12-24' | |
order by personas.updated_at asc | |
// UPDATE | |
UPDATE personas NUEVA | |
left join personas_23_dic VIEJA ON | |
NUEVA.id = VIEJA.id | |
set | |
updated_at = if(DATE(personas.updated_at) = '2013-12-24', personas_23_dic.updated_at, personas.updated_at) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment