Ver Mensaje Individual
  #7 (permalink)  
Antiguo 25/08/2011, 14:17
Avatar de gasuton
gasuton
 
Fecha de Ingreso: octubre-2010
Ubicación: Abandonware
Mensajes: 132
Antigüedad: 13 años, 6 meses
Puntos: 2
Respuesta: Reportes con una DB de Access

Cita:
Iniciado por gasuton Ver Mensaje
SELECT CHECKINOUT.username AS username,
CHECKINOUT.devicename AS devicename,
CHECKINOUT.CHECKTIME AS CHECKTIME,
DEPARTMENTS.DEPTNAME AS DEPTNAME
FROM CHECKINOUT, USERINFO, DEPARTMENTS
WHERE CHECKINOUT.USERID = USERINFO.USERID AND
USERINFO.DEFAULTDEPTID = DEPARTMENTS.DEPTID AND
(CHECKINOUT.CHECKTIME BETWEEN ? AND ?) AND
(DEPARTMENTS.DEPTNAME LIKE 'Docentes')
ORDER BY username, CHECKTIME
Les dejo un poco mas de info, despues de ejecutar el query obtengo la siguiente info:

username devicename CHECKTIME DEPTNAME
Alberto Entrada 02/08/2011 03:21:10 p.m. Docentes
Alberto Entrada 02/08/2011 03:21:10 p.m. Docentes
Alberto Salida 02/08/2011 05:26:59 p.m. Docentes
Alberto Salida 02/08/2011 05:26:59 p.m. Docentes
Alberto Entrada 03/08/2011 02:31:58 p.m. Docentes
Alberto Entrada 03/08/2011 02:31:58 p.m. Docentes
Alberto Salida 03/08/2011 05:33:51 p.m. Docentes
Alberto Salida 03/08/2011 05:33:51 p.m. Docentes
Alberto Entrada 06/08/2011 08:22:23 a.m. Docentes
Alberto Entrada 06/08/2011 08:22:23 a.m. Docentes
Alberto Salida 06/08/2011 08:59:52 a.m. Docentes
Alberto Salida 06/08/2011 08:59:52 a.m. Docentes
Alberto Entrada 08/08/2011 01:25:00 p.m. Docentes
Alberto Entrada 08/08/2011 01:25:00 p.m. Docentes
Alberto Salida 08/08/2011 04:31:12 p.m. Docentes
Alberto Salida 08/08/2011 04:31:12 p.m. Docentes
Alejandr Entrada 01/08/2011 07:52:18 a.m. Docentes
Alejandr Entrada 01/08/2011 07:52:18 a.m. Docentes
Alejandr Salida 01/08/2011 03:11:29 p.m. Docentes
Alejandr Salida 01/08/2011 03:11:29 p.m. Docentes
Alejandr Entrada 02/08/2011 08:00:02 a.m. Docentes
Alejandr Entrada 02/08/2011 08:00:02 a.m. Docentes
Alejandr Salida 02/08/2011 03:11:53 p.m. Docentes
Alejandr Salida 02/08/2011 03:11:53 p.m. Docentes


Como pueden apreciar me esta repitiendo los datos, yo lo que quiero hacer es que valide la fecha y si se repite solo muestre una solo, pero no se como hacer esto.

Saludos