|
|
Archives of the TeradataForum
Message Posted: Tue, 14 Jul 2004 @ 01:01:54 GMT
Subj: | | Re: Joining to current month |
|
From: | | Terry Stover |
You could try materializing a single row table with the current period data as part of the ETL process. That allows you to pre-calculate other
calendar related data like same day fiscal month, fiscal week, same day last quarter, same day last year etc. I've played with materializing
columns to support emulate the windowed aggregate functions like SUM xxxx OVER xxxx. If you are doing a trailing 12 months you just add columns
for TTM_BEGIN_DATE and TTM_END_DATE that can be used in a case statement or where clause. Same idea works for quarter to date. If you ever get a
situation where the single row current_period table isn't being copied to all amps you have a pretty strong argument for a DR from NCR.
| |