Ver Mensaje Individual
  #12  
Antiguo 30-09-2006
Avatar de Héctor Randolph
[Héctor Randolph] Héctor Randolph is offline
Miembro Premium
 
Registrado: dic 2004
Posts: 882
Reputación: 20
Héctor Randolph Va por buen camino
Otra opción, intenta colocar el DISTINCT enseguida del SELECT y no dentro del paréntesis:

Código SQL [-]
dm.QHorario.SQL.Clear;
dm.QHorario.SQL.Add('SELECT DISTINCT COUNT(HORARIO.NUM_FICHA) AS TOTALFICHAS');
dm.QHorario.SQL.Add(' FROM HORARIO,FICHA ');
dm.QHorario.SQL.Add('WHERE HORARIO.NUM_FICHA=FICHA.NUM_FICHA');
dm.QHorario.SQL.Add(' AND HORARIO.F_INI_HORARIO<=:e');

Saludos
Responder Con Cita