En que parte de mi codigo pondria esta linea que me estas enviando .
CasewhenIsnull(TuCampo, 0)= 0 then "Sin Huella")r
Urgente.
Código SQL
[-]
select r.*,(selectTop 1 [LogTime]from History as h where [UserID]= r.FingerID AND [FKey]='Entrada'and [LogDate] ='2011/05/27')Entrada,--(select Top 1 [LogTime]from History as h where [UserID]= r.FingerID AND [FKey]='InicioAlmuerzo'and [LogDate] ='2011/05/27')InicioAlmuerzo,
--(select Top 1 [LogTime]from History as h where [UserID]= r.FingerID AND [FKey]='FinAlmuerzo'and [LogDate] ='2011/05/27')FinAlmuerzo,
(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
--,[NomProy_per] Proyecto
--,[NomArea_per] Area
FROM T_Personal
where [NomProy_per] ='Nextel'---and NomArea_per = 'Comercial'
and Estado_per ='Activo')r
OrderBy r.ApellidoPaterno, r.ApellidoMaterno;