Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Fri, 17 Jan 2003 @ 17:50:46 GMT

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

Subj:   Re: Daily updates to a history table
From:   Michael Larkins


Off the top of my head, I can think of a few potential solutions:

1. Fastload your rows into an interim table. Then, do an update join of the interim table to the table containing the prior_acct_nbr. At that point, insert/select them into the history table. Finally, insert/select them into the account table. Another option instead last ins/sel - in a macro (for transactional processing) Sel * from account UNION Sel * from temp_account into a temp table; del account table; ins/sel from temp table into accounts table. This avoids the transient journaling and therefore will be fast.

2. Use MultiLoad to load the rows into the accounts table and the history table in a single run. However, you will need to write an INMOD to do the lookup in order to provide the prior_acct_nbr.

3. Use BTEQ to read the data file, do the lookup and write the file back onto disk for a MultiLoad run to load both tables without an INMOD.

Hope this gives you some ideas. Combinations of these basic approaches can also work.



  <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: 28 Jun 2020