Ver Mensaje Individual
  #2  
Antiguo 10-08-2004
Avatar de jachguate
jachguate jachguate is offline
Miembro
 
Registrado: may 2003
Ubicación: Guatemala
Posts: 6.254
Reputación: 27
jachguate Va por buen camino
Se me ocurre esto:

Código SQL [-]
select t1.campo1, t1.campo2, t1.campo3, t1.fecha
  from tabla t1
 where t1.fecha = (select max(t2.fecha)
                     from tabla t2
                    where t2.campo1 = t1.campo1
                      and t2.campo2 = t1.campo2)

Aunque no lo he probado dado que no tengo un motor a mano... probalo y espero que regreses a decir si te sirvió o no.

Hasta luego.

__________________
Juan Antonio Castillo Hernández (jachguate)
Guía de Estilo | Etiqueta CODE | Búsca antes de preguntar | blog de jachguate
Responder Con Cita