Ver Mensaje Individual
  #3 (permalink)  
Antiguo 29/01/2013, 11:26
Avatar de Libras
Libras
Colaborador
 
Fecha de Ingreso: agosto-2006
Ubicación: En la hermosa perla de occidente
Mensajes: 7.412
Antigüedad: 17 años, 9 meses
Puntos: 774
Respuesta: Problema con un select

creo que la solucion seria:

WHERE
(EMPL.isr > 0 AND EMPL.num_empresa = 5)
AND (EMPL.fecha_inicio_planilla >= '2012-01-01' OR EMPL.isr > 0 AND EMPL.num_empresa = 5 AND
EMPL.fecha_inicio_planilla <= '2012-12-15')

saludos!
__________________
What does an execution plan say to t-sql query? Go f**k yourself, if you are not happy with me