Ver Mensaje Individual
  #19 (permalink)  
Antiguo 15/03/2013, 09:52
Avatar de chris225
chris225
 
Fecha de Ingreso: octubre-2012
Ubicación: Medellin
Mensajes: 149
Antigüedad: 11 años, 6 meses
Puntos: 2
Respuesta: problema con funcion con rango de fechas

mira cree una una subconsulta

where (TD.FECHA=@pfecha and TD.FECHA1=@pfecha1) and
(DATEDIFF(DAY, @pfecha,@pfecha1)) > all (select rc.Desde from GS_Recaudo where (DATEDIFF(DAY, @pfecha,@pfecha1) >= rc.desde)) and
(DATEDIFF(DAY, @pfecha,@pfecha1)) < all (select rc.Hasta from GS_Recaudo where (DATEDIFF(DAY, @pfecha,@pfecha1) >= rc.Hasta))