Re: How can a group by clause be modified so the end weeks of the year won't be split?
Date: Thu, 29 Jan 2009 03:10:21 -0800 (PST)
> The ONLY problem, here, is that if New Years day occurs in the middle of the week, that week's data will be split at the first second of the New Year. <
A nobody said it yet: a calendar table often might help in such a situation. A web search brings up some samples how to construct that. Basically you create a table holding all date values in which your busineess might occurr. Then you add columns for the week number and whatever you else may need. Then a simple JOIN operation on the date columns helps to get the desired week number out of the calendar table.
Philipp Post Received on Thu Jan 29 2009 - 05:10:21 CST