Ver Mensaje Individual
  #3 (permalink)  
Antiguo 02/09/2013, 09:11
esneideramy
 
Fecha de Ingreso: agosto-2013
Ubicación: Medellín
Mensajes: 3
Antigüedad: 10 años, 8 meses
Puntos: 0
Respuesta: ¿Cómo validar si múltiples registros existen en una tabla?

Lo solucioné con lo siguiente:


Código MySQL:
Ver original
  1. SELECT DISTINCT usrID, Date FROM connectionhistory
  2.   WHERE usrID not in (select usrID
  3.                       from connectionhistory
  4.                       where DATE(Date) < DATE('2013-04-21 23:31:23'))
  5. AND DATE(Date) >= DATE('2013-04-21 23:31:23')
  6. AND DATE(Date) <= DATE('2013-05-29 12:26:50')
  7. group by usrID ORDER BY `Date` ASC ;