Ver Mensaje Individual
  #6  
Antiguo 15-03-2010
Avatar de guillotmarc
guillotmarc guillotmarc is offline
Miembro
 
Registrado: may 2003
Ubicación: Huelva
Posts: 2.638
Reputación: 24
guillotmarc Va por buen camino
Hola.

Para saber todos los que cumplen años hoy :

Código SQL [-]
select * 
from CLIENTES 
where extract(year from NACIMIENTO) = extract(year from current_date) and 
        extract(month from NACIMIENTO) = extract(month from current_date) and 
        extract(day from NACIMIENTO) = extract(day from current_date)

Los que cumplen años este mes son :

Código SQL [-]
select * 
from CLIENTES 
where extract(year from NACIMIENTO) = extract(year from current_date) and 
          extract(month from NACIMIENTO) = extract(month from current_date)

Saludos
__________________
Marc Guillot (Hi ha 10 tipus de persones, els que saben binari i els que no).

Última edición por guillotmarc fecha: 15-03-2010 a las 18:56:16.
Responder Con Cita