Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 16 Jul 2004 @ 20:55:18 GMT


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


Subj:   Re: UPSERT Using Straight SQL
 
From:   Dieter Noeth

Chris Coffing wrote:

  I am trying to update / insert into a table from another table. Can I do this using an UPDATE (UPSERT FORM)???  


  So far I have not found a way to do this. It appears that the UPSERT form is looking for a parameter file to load from and does not support a derived table and an INSERT / SELECT.  



Ins/Sel can't be used with Upsert.

You'll have to wait until Teradata supports the full "Merge Into" syntax from SQL:1999 with sets of data. The current Upsert/Merge implementation only allows simple Inserts/Updates based on PI access.

You still have to use the traditional approach: "Update From" the existing rows and then "Insert/Select where not exists" the remaining rows...


Dieter



     
  <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