Compare multiple date ranges
问题 I am using iReport 3.0.0, PostgreSQL 9.1. For a report I need to compare date ranges from invoices with date ranges in filters and print for every invoice code if a filter range is covered , partially covered , etc. To complicate things, there can be multiple date ranges per invoice code. Table Invoices ID Code StartDate EndDate 1 111 1.5.2012 31.5.2012 2 111 1.7.2012 20.7.2012 3 111 25.7.2012 31.7.2012 4 222 1.4.2012 15.4.2012 5 222 18.4.2012 30.4.2012 Examples Filter: 1.5.2012. - 5.6.2012.