Re: How can a group by clause be modified so the end weeks of the year won't be split?

From: Bob Badour <>
Date: Thu, 29 Jan 2009 10:29:55 -0400
Message-ID: <4981bd65$0$5490$>

Philipp Post wrote:

> Ted,

>>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.
> brgds
> Philipp Post

Since a function is just a relation with particular qualities, what is the theoretical difference between joining to a table to get the WEEK and calling a WEEK function? Received on Thu Jan 29 2009 - 15:29:55 CET

Original text of this message