Tema: Sql
Ver Mensaje Individual
  #9  
Antiguo 18-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
Sql

Estimado este es el codigo que me iva a mandar por que lo e probado y me sigue saliendo el mismo error.

select
DISTINCT
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;
Responder Con Cita