Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 10 Apr 2006 @ 10:45:17 GMT


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


Subj:   Re: SAME TABLE UPDATE
 
From:   Anomy Anom

<-- Anonymously Posted: Sunday, April 09, 2006 08:53 -->

if theres only 1 table involved, simply use below format

     UPDATE db.table
     set col1 = 
     where col2 = col3 etc.

so in ur case if u want to update PRODDSS_DEV.POITOUSE u can say

     update PRODDSS_DEV.POITOUSE
     set ord_qty = del_qty

which would do an update for each row as you dont have any filter conditions.

If you want to join to another table for update then do something like this

     UPDATE a
     set a.col1 = b.col2
     FROM PRODDSS_DEV.POITOUSE a,
     PRODDSS_DEV.ORDERS b
     where a.order_no = b.order_no


     
  <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