alen teplitsky (8/18/2010)
nice articlei tried using it today and the only problem was that my source data had hours and minutes and it would have taken too long to figure out a way to join it properly
I know this is an old post but figured I'd show how easy that join actually is thanks to Todd's forsight in including a "NextDay" column ...
SELECT whatever
FROM dbo.yourtable yt
INNER JOIN dbo.Calendar c
ON yt.YourDate >= c.DayDate
AND yt.YourDate < c.NextDay
--Jeff Moden
Change is inevitable... Change for the better is not.