Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/11/2005, 06:02
oriopitufa
 
Fecha de Ingreso: julio-2005
Mensajes: 103
Antigüedad: 19 años, 6 meses
Puntos: 0
Duda en consulta Access

Hola amigos,
la siguiente consulta me muestra todos los registros de la tabla sin llegar a tomar en cuenta el "NOT EXISTS" que he puesto. Sabríais decir por qué??

Código:
Select codProd,codLin,minStd,segStd from ProductoLinea as PL1 where codProd='" & prod & "' and not exists (Select * from ProductoLinea as PL2 where PL1.codLin=PL2.codLin and PL1.codProd=PL2.codProd and CDate(PL2.fecha)>CDate(PL1.fecha)) order by codLin asc"
Muchas gracias