Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > SQL
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

 
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 25-05-2011
Richard Lopez G Richard Lopez G is offline
Miembro
NULL
 
Registrado: may 2011
Posts: 32
Poder: 0
Richard Lopez G cantidad desconocida en este momento
SQL-OrderBy

Estimados tengo un problema no me permite utilizar el order by en esas sub consultas ayuda por favor, me sale este error

Msg 1033, Level 15, State 1, Line 19
La clusula ORDER BY no es vlida en vistas, funciones en lnea, tablas derivadas, subconsultas ni expresiones de tabla comn, salvo que se especifique tambin TOP o FOR XML.

Ayuda Urgente

select r.*,(selectTop 1 [LogTime]from History as h where [UserID]= r.FingerID AND [FKey]='Entrada'and [LogDate] ='2011/05/24')Entrada,(selectTop 1 [LogTime]from History as h where [UserID]= r.FingerID AND [FKey]='InicioAlmuerzo'and [LogDate] ='2011/05/24')InicioAlmuerzo,(selectTop 1 [LogTime]from History as h where [UserID]= r.FingerID AND [FKey]='FinAlmuerzo'and [LogDate] ='2011/05/24')FinAlmuerzo,(selectTop 1 [LogTime]from History as h where [UserID]= r.FingerID AND [FKey]='Salida'and [LogDate] ='2011/05/24')Salida
FROM(SELECT [Cod_per] CodPersonal
,[ApePat_per] ApellidoPaterno
,[ApeMat_per] ApellidoMaterno
,[Nom_per] NombrePersonal
,[NomProy_per] Proyecto
,[NomArea_per] Area
,[Estado_per] Estado
,[Cod_Finger] FingerID
FROM T_Personal
where [NomProy_per] ='Nextel'---and NomArea_per = 'Sistemas'
and Estado_per ='Activo')r;

Última edición por Casimiro Notevi fecha: 25-05-2011 a las 18:31:50.
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Problema con orderby en interbase 6 rafa_adrim Firebird e Interbase 1 16-06-2006 00:27:00


La franja horaria es GMT +2. Ahora son las 06:01:19.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi