Ver Mensaje Individual
  #4 (permalink)  
Antiguo 11/11/2009, 08:08
Avatar de huesos52
huesos52
Colaborador
 
Fecha de Ingreso: febrero-2009
Ubicación: Manizales - Colombia
Mensajes: 5.980
Antigüedad: 15 años, 2 meses
Puntos: 360
Respuesta: SQL de Fechas

Con el uso de la sentencia case puedes enfocar tu problema.

select (case when extract(month from fecha) = 1 and impreso = 1 then count(impreso) else '' end) enero, (case when extract(month from fecha) = 2 and impreso = 1 then count(impreso) else '' end) febrero etc etc.

http://www.adp-gmbh.ch/ora/sql/case_when.html
__________________
Without data, You are another person with an opinion.
W. Edwads Deming