Tema: Query
Ver Mensaje Individual
  #1  
Antiguo 27-05-2011
Richard Lopez G Richard Lopez G is offline
Miembro
NULL
 
Registrado: may 2011
Posts: 32
Reputación: 0
Richard Lopez G cantidad desconocida en este momento
Query

Estimados necesito una ayuda si es que se puede dar, he realizado un query con subconsultas mi pregunta es la siguiente mi query es este.

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;

este son los datos que me arroja

CodPersCodFingerDNIApellPaternoApellMaternoNombreEntradaSalida85128343497746AburtoArellanoWilmer7:25:01NULL776340884398AltamiranoReateguiJose Luis7:23:14NULL7815143546007BacaDavilaVictor Hugo7:36:14NULL71327044026275BravoOrtizJaime Eusebio9:39:46NULL1515442786534CanalesCustodioCarlos Javier7:17:59NULL80927440857417CaveroLiviaDaniel Alonso7:20:35NULL

Sale que cuando me arroge los datos null yo quiero ponerle un texto que diga (No Digito huella).

A la espera de su ayuda si es que se puede realizar.

Gracias.
Responder Con Cita