Way1
update A set A.sCard = B.sCard
from A,B
where A.sName = B.name
Way2
update a set sCard=(select b.card from b where name=a.sName)
我今天需要修改系统数据,用批量上传的表更新原有数据。在网上找到了上面两种方法。
第一种在as400上不可用。
第二种试了可以的,不过最好在加上限制。
语句如下:
update acustm set acustm.AYAREA = (select substr(AYSORT,1,6) from tylib/cust where AYCUST = ACUSTM.AYCUST) where AYCUST in (select AYCUST from tylib/cust)
615 rows updated in ACUSTM in R5ASPPROD.