October 30, 2010 at 2:30 pm
I hope folks don't mind me adding some problems to this forum and then solving them with an article. This one is asked over and over and over... I've got this one and have just submitted an "SQL Spackle" article on it.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 30, 2010 at 10:34 pm
Jeff - what do you mean by "overlapping" dates, and how does this differ from determining gaps/islands?
(If it's different, we probably ought to add one for each of those.)
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 31, 2010 at 12:05 am
I think Jeff means extending date ranges.
If you have three date ranges
20100101-20100630, 20100515-20100930 and 20100928-20101010,
the end result is 20100101-20101010.
N 56°04'39.16"
E 12°55'05.25"
October 31, 2010 at 10:02 am
WayneS (10/30/2010)
Jeff - what do you mean by "overlapping" dates, and how does this differ from determining gaps/islands?(If it's different, we probably ought to add one for each of those.)
It's the same as determining "islands" for dates whether or not there are duplicate dates or not. As you and I both know, it can be a bit different than finding gaps/islands in integer data. It can also be the same but most folks usually go for a different tact when it's integer based.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 31, 2010 at 10:07 am
SwePeso (10/31/2010)
I think Jeff means extending date ranges.If you have three date ranges
20100101-20100630, 20100515-20100930 and 20100928-20101010,
the end result is 20100101-20101010.
That would be a separate article I was going to work on but I'll be happy to let someone else tackle it if they'd like. The name of the article I just submitted is actually "Group "Islands" of Contiguous Dates (SQL Spackle) " because I realized later on just exactly what Peter brought up above. We have to be careful to not confuse finding islands in a single column with finding islands in overlapping date ranges.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 31, 2010 at 11:40 pm
Jeff Moden (10/31/2010)
SwePeso (10/31/2010)
I think Jeff means extending date ranges.If you have three date ranges
20100101-20100630, 20100515-20100930 and 20100928-20101010,
the end result is 20100101-20101010.
That would be a separate article I was going to work on but I'll be happy to let someone else tackle it if they'd like. The name of the article I just submitted is actually "Group "Islands" of Contiguous Dates (SQL Spackle) " because I realized later on just exactly what Peter brought up above. We have to be careful to not confuse finding islands in a single column with finding islands in overlapping date ranges.
So did either of you decide to pick up and write about the problem that Peter posted in the quote above?
--Jeff Moden
Change is inevitable... Change for the better is not.
November 1, 2010 at 1:51 pm
No need to add it if you'll write it. I'm more looking for a place to keep track of holes that I find in the article base.
November 1, 2010 at 2:12 pm
Steve Jones - SSC Editor (11/1/2010)
No need to add it if you'll write it. I'm more looking for a place to keep track of holes that I find in the article base.
But, if it's added, then others that think up one of these quickies will know it's already been handled.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
January 3, 2011 at 8:43 am
Closed as this one is complete.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply