Ver Mensaje Individual
  #8  
Antiguo 03-04-2012
Avatar de RONPABLO
[RONPABLO] RONPABLO is offline
Miembro Premium
 
Registrado: oct 2004
Posts: 1.514
Reputación: 23
RONPABLO Va por buen camino
Que tal así:
Código SQL [-]
        if(coalesce(:fecha_nacimiento,'1899-12-30') > '1899-12-30')then           
       begin
             tmp=CURRENT_DATE - :fecha_nacimiento;
             edad=EXTRACT(YEAR from tmp);
       end         
      else    
      begin
             edad=0;
      end
__________________
"Como pasa el tiempo..... ayer se escribe sin H y hoy con H"
Responder Con Cita