I have a database table that is a catalog of each day of business (DOB) for my 3 'stores' ranging over a year. Other than the Store ID and DOB, all other data here is irrelevant for this discussion.
The data entry of this table is not necessarily in chronological order; I may have entered data moving forward BUT may also have gone backwards in an effort to catch up historical info. Hence, there is no integrity or relationship between the Record ID and the DOB throughout this table.
Example: I entered all 31 days of January 2013 then entered all previous November 2012 data before entering Feb 2013 and then jumping back to Dec 2012.....so on and so forth.
What I want to do is find the earliest DOB for a particular Store ID and move forward to the most recent DOB for that Store ID and check whether I'm missing any dates between. Obviously I could do that visually for a week or a month but it becomes a bit harder when going thru a year or more.
I can't imagine repeatedly querying the DB table would be effective or efficient but I'm not sure on the logic in looping thru a datatable.
Can anybody give me a hand here? Appreciate your help.