Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 15 Apr 1999 @ 13:20:32 GMT


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


Subj:   Table alias in updates
 
From:   Hays McLean

What is wrong with the syntax below? I am trying to define an alias for the table to update (t1) and for the table that I am getting the data from (t2). The t1 seems to work okay by itself, but when I use t2 as the alias name for the source table, I get an error 'Illegal usage of alias name'.

The only way that I have been able to accomplish updates like below is to use the full table name. How can an alias be defined for this table?

Thanks for any info.

     update  database1.t_table t1
     from    database1.s_table t2
     set     primary_rc = t2.primary_rc
     where   t1 .primary_rc = '0000'
             and
             t1.household_num = t2.household_num
             and
             t2.period_end_date = 981231 ;

Hays McLean
First American National Bank



     
  <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