Merge two tables and find overlapping dates and Gaps
问题 I would like to solve below scenarios for ID 100 & 101 as given output using oracle Analytical functions. any ideas? TABLE A: ID ValidFrom ValidTo 100 1/1/2009 12/31/2010 100 1/1/2011 3/31/2012 101 8/1/2013 7/31/2014 101 8/1/2014 8/31/2014 TABLE B ID ValidFrom ValidTo 100 11/1/2008 12/31/2011 100 2/1/2012 2/29/2012 101 8/1/2013 6/30/2014 101 7/1/2014 8/31/2014 OUTPUT: ID ValidFrom ValidTo 100 11/1/2008 12/31/2008 100 1/1/2009 12/31/2010 100 1/1/2011 12/31/2011 100 1/1/2012 1/31/2012 100 2/1