![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
21/04/2009, 08:05
|
![Avatar de Taribo007](http://static.forosdelweb.com/customavatars/avatar192356_1.gif) | | | Fecha de Ingreso: agosto-2007
Mensajes: 1.338
Antigüedad: 17 años, 6 meses Puntos: 18 | |
Respuesta: Duda consulta anidada update+select La select por si sola funciona???
Prueba asi:
UPDATE historic_carrecs SET finalitzat = 'si' WHERE idCarrec IN (SELECT h.idCarrec FROM historic_carrecs as h, carrecs as c WHERE h.finalitzat = 'no' AND c.codi = h.idCarrec AND h.data_fi <= now())
Un saludo |