Tuesday, October 17, 2006

A couple of months ago, I have posted an article about finding unused key ranges. Today, I faced a very similar problem: find gaps in time ranges.

I have adapted the sql of the previous post to work with date ranges. To avoid problems with the maximum date 9999-12-31, I do convert the dates to a number (the number of the day in the Julian calendar).