primero que nada USA LOS TAG's URGENTEEEEEEEEEEEEEEEE
luego
elimina todo lo que no sirve de tu query,
Código Delphi
[-]
select r.*,(selectTop 1 [LogTime]from History as h where [UserID]= r.FingerID AND [FKey]='Entrada'and [LogDate] ='2011/05/27')
Entrada,(selectTop 1 [LogTime]from History as h where [UserID]= r.FingerID AND [FKey]='Salida'and [LogDate] ='2011/05/27')Salida
FROM(SELECT [Cod_per] CodPers
,[Cod_Finger] FingerID
,[DNI_per] DNI
,[ApePat_per] ApellidoPaterno
,[ApeMat_per] ApellidoMaterno
,[Nom_per] NombrePersonal
FROM T_Personal
where [NomProy_per] ='Nextel'and Estado_per ='Activo')r
OrderBy r.ApellidoPaterno, r.ApellidoMaterno;
tu Query esta muy complicado, quiza si analizas bien existen oyras maneras de hacer lo que quieres, segun entiendo, debes identificar las salidas verdad?, entonces lo que te dije mas o menos iria por aqui
algo asi
Código Delphi
[-]
select Top 1 Case When isnull([LogTime],0) = 0 Then "Sin Huella" Else [LongTime] end
from History as h
where ([UserID]=FingerID AND [FKey] = 'Salida' and [LogDate] = '2011/05/27')Salida