Quantcast
Channel: SQLServerCentral » Reporting Services » Reporting Services » Latest topics
Viewing all articles
Browse latest Browse all 2791

Select records based on two dates

$
0
0
I've set up a report with two parameters, @StartDate and @EndDate. Report users expect to enter the following values:[b]StartDate:[/b] 9/20/2013 [b] EndDate:[/b] 9/20/2013 -- Show all records dated 9/20/2013[b]StartDate:[/b] 9/20/2013 [b]EndDate:[/b] [empty] -- Show all records dated 9/20/2013[b]StartDate:[/b] 9/20/2013 [b]EndDate:[/b] 9/23/2013 -- Show all records dated between 9/20/2013 and 9/23/2013, including all records dated 9/23/2013[b]StartDate:[/b] [empty] [b]EndDate:[/b] [empty] -- Don't filter any records based on date (show all records for all dates)I believe I need to handle all these cases in the "WHERE" statement for the query, but I'm not sure how to go about doing this. Hopefully someone can point me in the right direction to get started with this.

Viewing all articles
Browse latest Browse all 2791

Latest Images

Trending Articles



Latest Images