Archives of the TeradataForum
Message Posted: Mon, 10 Apr 2006 @ 10:45:17 GMT
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
|