Ver Mensaje Individual
  #2 (permalink)  
Antiguo 08/01/2010, 11:28
Avatar de Andres95
Andres95
Colaborador
 
Fecha de Ingreso: diciembre-2004
Mensajes: 1.802
Antigüedad: 19 años, 4 meses
Puntos: 38
Respuesta: Consulta - Select Anidado

anidarlo es muy sencillo..

Código:
SElect *
FROM (
-------------------------
select EncuestaViajeEtapaid, EncuestaModoTransporteid, PartidoID, LocalidadId, CalleID, HitoId, OtroHitoColectivoOrigen, OtraCalleColectivoSubida, AlturaColectivoSubida, EsquinaColectivoSubida
from encuestaviajeetapa
where encuestaviajeetapaid in (
7924,
6507
,9200
,6841
.
.
.
.
,4861
,3389
,3401
,3417
,6992
)

--------------------------
)
WHERE MISCONDICIONES
o bien puedes insertar el resultado en una temporal y manupularla con el select..

Saludos!
__________________
La sencillez y naturalidad son el supremo y último fin de la cultura...
--
MCTS : SQL Server 2008, .NET Framework 3.5, ASP.NET Applications.