Hi I have below SQL 2008 R2 table where user input data for a given account code with date-ranhe i.e. StartDate and EndDate
AccountCode StartDate EndDate Amount
ACC1 2013-12-15 2013-12-27 10.50
ACC1 2014-01-17 2014-02-19 80.95
ACC2 2013-01-21 2013-01-25 78.71
..................
..................
I'd like to design a report with two parameters that users will be passing : StartDate and EndDate
For an example if user pass 2013-12-14 to 2013-12-19 then first row in above sample table should be display. As a second example if user pass from 2013-12-01 to 2014-01-24 then above first and second rows should display. Any T-SQL please?