I have a SSRS report where I pass start date and end date to filter my data. I need to get those records having data between passed date values.I have query as below..
SELECT * FROM Sample s WHERE s.RecStartDate >= ISNULL(@StartDate,s.RecStartDate)
AND s.RecEndDate <= ISNULL(@EndDate,s.RecEndDate)
Here I have to handle 'NULL' and data is from two different fields. But the problem is, in my SSRS report default value for those two dates is 'TODAY'. When I choose @StartDate as 'TODAY' and @EndDate as 10/12/2010, it will never work as per above condition. Please help me solve this.
Thanks, Su.