Ver Mensaje Individual
  #11  
Antiguo 20-06-2008
Avatar de RolphyReyes
RolphyReyes RolphyReyes is offline
Miembro
 
Registrado: ago 2004
Ubicación: Santo Domingo
Posts: 285
Reputación: 20
RolphyReyes Va por buen camino
Smile

Saludos.

Enecumene trata con la siguiente sentencia:

Código SQL [-]
SELECT SUM(CASE TIPO WHEN 'E' THEN 1 ELSE 0 END) TIPOE,
       SUM(CASE TIPO WHEN 'S' THEN 1 ELSE 0 END) TIPOS,
       SUM(CASE TIPO WHEN 'X' THEN 1 ELSE 0 END) TIPOX
FROM EMPLEADOS

Sustituye por SUM los COUNT y utilizas CASE para preguntar por el valor y cuéntanos luego.

Suerte!!!
__________________
Gracias,
Rolphy Reyes
Responder Con Cita