Ver Mensaje Individual
  #2 (permalink)  
Antiguo 23/06/2010, 15:23
jurena
Colaborador
 
Fecha de Ingreso: marzo-2008
Ubicación: Cáceres
Mensajes: 3.735
Antigüedad: 16 años, 1 mes
Puntos: 300
Respuesta: Problema con consulta anidada

Prueba así:
SELECT m.id, m.nombre, t1.estado, t1.fechacreacion FROM MATERIAL m INNER JOIN (SELECT idmaterial, estado, fechacreacion FROM HISTORIAL_MATERIAL ORDER BY fechacreacion DESC)t1 on t1.idmaterial = m.id GROUP BY m.id