May 11, 2012 at 11:04 am
others will certainly do it differently than I do, but I have three different tables for accomplishing Tally-related objectives:
Tally, which starts with 1,
TallyCalendar, which is all date related.
and Numbers, which starts at 0.
so if i'm writing something that needs to join to zero, i use the Numbers table (instead of Tally.N -1) just for convenience sake.
also, for me, the code jumps out a little more; if i join to Numbers, i know it's because of zero.
Lowell
May 11, 2012 at 11:53 am
Lowell (5/11/2012)
others will certainly do it differently than I do, but I have three different tables for accomplishing Tally-related objectives:Tally, which starts with 1,
TallyCalendar, which is all date related.
and Numbers, which starts at 0.
so if i'm writing something that needs to join to zero, i use the Numbers table (instead of Tally.N -1) just for convenience sake.
also, for me, the code jumps out a little more; if i join to Numbers, i know it's because of zero.
Well, that certainly covers the bases as far as convenience is concerned, and I like the reasoning behind the usages. Of course, if I were to do that, unless they were fairly small tables I would probably have someone complaining about the duplicate data coverage. (On the other hand, if that was really a concern, I'll bet that making Tally a view based on Numbers would be a simple enough implementation that the query plans for either one would be pretty near identical).
Thanks for sharing.
- Les
Viewing 2 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply