Archives of the TeradataForum
Message Posted: Thu, 19 Sep 2002 @ 20:59:31 GMT
Subj: | | Summing 3 tables |
|
From: | | uknair |
I have to sum up 3 monthly fact tables(annualize) and load the results to a third table as below
Case (acct exist in month1 , month2 ,month3)
(amt_month1 + amt_month2 + amt_month3) * 4 -> amt
Case (acct exist in month1 , month2)
(amt_month1 + amt_month2) * 6 -> amt
Case (acct exist in month1)
(amt_month1) * 12 -> amt
What is best way to do it. The tables are relatively big with about 65 million rows and 30 amt columns(decimal(14,2)) per row.
|