Ver Mensaje Individual
  #2 (permalink)  
Antiguo 08/10/2003, 11:21
Avatar de Viet
Viet
 
Fecha de Ingreso: octubre-2003
Ubicación: Mar del Plata - Argentina
Mensajes: 247
Antigüedad: 20 años, 7 meses
Puntos: 2
Lo unico que se me ocurre es una subconsulta en el Where con :

Código:
  Select * 
 From TablaX
 Where 
     (datepart(dy,fecha)=datepart(dy,getdate()))  and 
      
      Id not in(select * from tablaX x inner join tablaY y on(x.IdAccion=y.IdAccion) where y.Permitido=0  and (clausela de fecha) )
Pero la verdad me parece bastante ineficiente y cargado para el DBMS

Algo mas simple?
__________________
Keep it simple and keep it fast.