Ver Mensaje Individual
  #2  
Antiguo 05-12-2010
cloayza cloayza is offline
Miembro
 
Registrado: may 2003
Ubicación: San Pedro de la Paz, Chile
Posts: 914
Reputación: 23
cloayza Tiene un aura espectacularcloayza Tiene un aura espectacular
Prueba este codigo

Código SQL [-]
query1.Close;
query1.SQL.Text:='select sum(cast(Substring(hora_ent from 1 for 2 ) as integer) as s from cursohs where curso=1';
query1.Open;

La sentencia Substring(hora_ent from 1 for 2 ), extrae la hora desde hora_ent, asumo que Hora_Ent es de tipo Time...

Saludos
Responder Con Cita