×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
I think that perhaps you want something like this....
UPDATE file1
SET (fld1, fld2, fld3, ...) =
(select file2.fld1, file2.fld2, file2.fld3, ...
From file2
Where file1.fld1=file2.fld1 and file1.fld2=file2.fld2)
WHERE exists (select * from file2 x where file1.fld1=x.fld1 and
file1.fld2=x.fld2)
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/s
qlp/rbafyexsub4.htm
hth,
-Eric DeLong
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Servizi Aziendali
- Massimo Ceroni
Sent: Thursday, February 04, 2010 8:04 AM
To: midrange-l@xxxxxxxxxxxx
Subject: Update with join
Hi.
I know I can update a table this way
UPDATE file1
SET file1.fld1=
(select file2.fld1 from file2
where file2.fld11=file1.fld11)
but I need to update more than one field at a time like this
UPDATE file1
SET file1.fld1=file2.fld1, file1.fld2=file2.fld2
...
WHERE file2.fld11=file1.fld11 and file2.fld12=file1.fld12
Thanks for any help
Massimo Ceroni
As an Amazon Associate we earn from qualifying purchases.