Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 19 Sep 2002 @ 20:59:31 GMT


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  


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.



     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 27 Dec 2016