Ver Mensaje Individual
  #2 (permalink)  
Antiguo 30/01/2008, 12:39
seyko
 
Fecha de Ingreso: febrero-2007
Mensajes: 1.292
Antigüedad: 17 años, 3 meses
Puntos: 13
Re: Error usando subconsulta

where nov_id<>0 and (select nov_id from novedades where nov_aprobacion=1 and nov_subtipo=5)
si utilizas un AND tienes que tener un boolean a cada lado del AND
cambia
and (select nov_id from novedades where nov_aprobacion=1 and nov_subtipo=5)
por
and nov_id in (select nov_id from novedades where nov_aprobacion=1 and nov_subtipo=5)
o
and nov_id = (select nov_id from novedades where nov_aprobacion=1 and nov_subtipo=5)

...

Salu2