I have a dataset that contains:
Table { date itemName }
The date for the most part is sequential. There are no duplicates of the date [as it is the primary key].
The question is split up into multiple parts (all with respect to using SQL):
- Is it possible to find gaps in the date series listed in the table?
For example: Dates
1/2/09-1/3/09
are missing - Is it possible to find sections of dates that are missing from the table, that has a range greater than n (this is a number determined at run time)? For example: For
n = 2
Dates1/2/09-1/3/09
are not returned but Dates5/6/09-6/1/09
are.