Ver Mensaje Individual
  #8  
Antiguo 20-06-2008
Avatar de enecumene
[enecumene] enecumene is offline
Miembro de Oro
 
Registrado: may 2006
Ubicación: Santo Domingo, Rep. Dom.
Posts: 3.040
Reputación: 22
enecumene Va por buen camino
Gracias amigo PCicom, haciendole algunas modificaciones porque me daba errores de sintaxis, quedó así:

Código SQL [-]
SELECT E.ID,E.NOMBRE,E.TANDA,COUNT(R.ENTRADA),
  COUNT(R.TARDANZA),
  COUNT(R.PERMISO),
  COUNT(R.LICENCIA),
  COUNT(R.ENFERMEDAD),
  COUNT(R.VACACIONES),
  COUNT(CASE R.EXCUSA WHEN 'S' THEN 1 Else 0 END) As EXCUSA_SI,
  COUNT(CASE R.EXCUSA WHEN 'N' THEN 1 Else 0 END) As EXCUSA_NO
  FROM REGISTRO R, EMPLEADOS E
WHERE E.ID=R.EMPID GROUP BY E.NOMBRE,E.ID,E.TANDA,R.EXCUSA

Pero aún así sigue el mismo problema, ya estoy casi cambiando la estructura de la tabla, deberé separar los datos en campos diferentes .

Saludos.
__________________

Mi BLOG - ¡Joder, leanse la guia de estilo!
Las Palabras son enanas, los ejemplos gigantes.
Responder Con Cita