Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 05 Jul 2004 @ 14:35:30 GMT


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


Subj:   Re: Order of Records in Source file for MLOAD
 
From:   Victor Sokovin

  If a source file has more than one record with same primary index (unique) value, what happens when an UPSERT MLOAD is run to load this file into a teradata table (with unique primary index) ?.  


  Will the first record (as per the sequence in the file) be INSERTED (assuming the table did not have the record before) and will the second record update the just INSERTED record ? If yes, where does this UPDATE happen; in the WORK table before applying to target table or while applying to the target table ?  



ML executes UPDATE and INSERT (in this order) in the work table so I think it won't meet your expectations in this case. The first record in your example will be inserted and the second record will be treated as a duplicate. What happens next will depend on the instructions regarding duplicates that you have given to ML.

In my opinion, the best way to proceed is to run a few tests with all possible cases.


Regards,

Victor



     
  <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: 15 Jun 2023