我有一张桌子:
表:
start end 1 Jan 09 31 Jan 2009 1 Feb 09 28 Feb 2009 1 Mar 09 31 Mar 2009 1 Apr 09 01 May 2009 1 May 09 31 May 2009 1 Jun 09 01 Jul 2009 1 Jul 09 31 Jul 2009 1 Aug 09 31 Aug 2009 1 Sep 09 01 Oct 2009 1 Oct 09 31 Oct 2009 1 Nov 09 01 Dec 2009 1 Dec 09 31 Dec 2009 1 Jan 10 31 Jan 2010 1 Feb 10 03 Mar 2010 1 Mar 10 31 Mar 2010 1 Apr 10 01 May 2010 1 May 10 31 May 2010 1 Jun 10 01 Jul 2010 1 Jul 10 31 Jul 2010 1 Aug 10 31 Aug 2010 1 Sep 10 01 Oct 2010 1 Oct 10 31 Oct 2010 1 Nov 10 01 Dec 2010 1 Dec 10 31 Dec 2010 1 Jan 09 31 Mar 2009 1 Apr 09 30 Jun 2009 1 Jul 09 01 Oct 2009 1 Oct 09 31 Dec 2009 1 Jan 10 31 Mar 2010 1 Apr 10 30 Jun 2010 1 Jul 10 01 Oct 2010 1 Oct 10 31 Dec 2010 1 Jan 09 31 Dec 2009 1 Jan 10 31 Dec 2010
以上内容包含2009年,2010年的每个月,每季度和每年.
我有另一张表,内容如下:
表2
start end 15-12-09 31-12-09 15-01-12 31-12-13 01-01-11 31-12-13 30-01-98 31-12-13 01-01-98 31-12-13 01-01-98 31-12-13 23-12-12 31-12-13 12-11-11 31-12-13 01-01-10 31-12-13
对于table2中的每个条目,我需要找到它落入table1的可能时间范围.
对于前者 来自table2,第一次进入 -
15-12-09 31-12-09
落到:
1 Dec 09 31 Dec 2009 1 Oct 09 31 Dec 2009 1 Jan 09 31 Dec 2009
在Oracle SQL中是否可以识别它?