This file contains hidden or 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
| UPDATE tabla1 t1 | |
| SET t1.valor = (SELECT t2.CODE FROM tabla2 t2 WHERE t1.valor = t2.DESC and t1.fecha=t2.fecha) | |
| WHERE t1.filtro='correcto' | |
| AND EXISTS (SELECT t2.CODE FROM tabla2 t2 WHERE t1.valor = t2.DESC and t1.fecha=t2.fecha); | |
| -- O | |
| UPDATE | |
| (SELECT t1.valor as OLD, t2.CODE as NEW | |
| FROM tabla1 t1 |