Hello,
I am trying to update a field, I have two join tables.
I have tried a few things but keep on getting various errors
two tables
AMFLIB2.CUSMAS AND AMFLIB2.MBEKRES2
the field I want to update is in AMFLIB2.CUSMAS.ACREC
the where statement uses the field EKCJNB from table AMFLIB2.MBEKRES2
I was wondering if anybody could point me in the right direction
Thanks you
I am trying to update a field, I have two join tables.
I have tried a few things but keep on getting various errors
two tables
AMFLIB2.CUSMAS AND AMFLIB2.MBEKRES2
the field I want to update is in AMFLIB2.CUSMAS.ACREC
the where statement uses the field EKCJNB from table AMFLIB2.MBEKRES2
I was wondering if anybody could point me in the right direction
Code:
UPDATE AMFLIB2.CUSMAS
SET ACREC = 'S'
WHERE
LEFT OUTER JOIN AMFLIB2.MBEKRES2
ON AMFLIB2.CUSMAS.CUSNO = AMFLIB2.MBEKRES2.EKCANB
AND AMFLIB2.MBEKRES2.EKCJNB <1150101
Code:
UPDATE AMFLIB2.CUSMAS
OUTER JOIN AMFLIB2.MBEKRES2 ON AMFLIB2.CUSMAS.CUSNO =
AMFLIB2.MBEKRES2.EKCANB
SET AMFLIB2.CUSMAS.ACREC = 'S'
FROM AMFLIB2.CUSMAS
WHERE (AMFLIB2.MBEKRES2.EKCJNB <1150101) AND (AMFLIB2.CUSMAS.ACREC
<>'S')