|
Sql
Estimado este es el codigo que me iva a mandar por que lo e probado y me sigue saliendo el mismo error.
selectDISTINCT
r.*,convert(char(10),GETDATE(),112) FechaActual ,
(select [LogTime]from History as h where [UserID]= r.FingerID AND [FKey]='Entrada'and [LogDate] ='2011/05/17')Entrada,
(select [LogTime]from History as h where [UserID]= r.FingerID AND [FKey]='InicioAlmuerzo'and [LogDate] ='2011/05/17')InicioAlmuerzo,
(select [LogTime]from History as h where [UserID]= r.FingerID AND [FKey]='FinAlmuerzo'and [LogDate] ='2011/05/17')FinAlmuerzo,
(select [LogTime]from History as h where [UserID]= r.FingerID AND [FKey]='Salida'and [LogDate] ='2011/05/17')Salida
FROM
(SELECT [Cod_per]CodPersonal
,[ApePat_per]ApellidoPaterno
,[ApeMat_per]ApellidoMaterno
,[Nom_per] NombrePersonal
,[NomProy_per]Proyecto
,[NomArea_per]Area
,[NomCargo_per]Cargo
,[Estado_per]Estado
,[Cod_Finger]FingerID
FROM T_Personal
where [NomProy_per]='BMP'
and NomArea_per='Sistemas'
and Estado_per='Activo')r;
|