Ver Mensaje Individual
  #2  
Antiguo 29-08-2012
Avatar de roman
roman roman is offline
Moderador
 
Registrado: may 2003
Ubicación: Ciudad de México
Posts: 20.269
Reputación: 10
roman Es un diamante en brutoroman Es un diamante en brutoroman Es un diamante en bruto
Intenta algo así:

Código SQL [-]
select A.expediente, A.orden
from orden_trabajadores_estibadores A
left join (select expediente from orden_trabajadores_estibadores group by expediente having count(expediente) > 1) B on B.expediente = A.expediente
where B.expediente is not null

// Saludos
Responder Con Cita