Tema: Sql compleja
Ver Mensaje Individual
  #7 (permalink)  
Antiguo 25/01/2006, 13:08
Avatar de u_goldman
u_goldman
Moderador
 
Fecha de Ingreso: enero-2002
Mensajes: 8.031
Antigüedad: 23 años, 4 meses
Puntos: 98
A ver prueba asi:

select a.idlocalidad from TLOCALIDAD a where a.IdLocalidad in
(select nombreResidencia from PRIVADAS WHERE idLocalidad = a.idlocalidad)
OR IdLocalidad in
(select nombreResidencia from PRIVADAS WHERE idLocalidad = a.idlocalidad)
WHERE a.idLocalidad = algun_id
__________________
"El hombre que ha empezado a vivir seriamente por dentro, empieza a vivir más sencillamente por fuera."
-- Ernest Hemingway