MERGE INTO TBL500_BUSUPACCESS A
USING (SELECT MCMCU,MCRP06, MCDL01 FROM CRPDTA.F0006@HIJDED1) B
ON (A.BU = Ltrim(MCMCU))
WHEN MATCHED
THEN
UPDATE SET
A.BU_DESC =
(CASE
WHEN A.MCCO IN 1 THEN SUBSTR(A.MCCO,-2)||' (PAR) '|| MCDL01
ELSE SUBSTR(A.MCCO,-2)||' ('||MCRP06||') '|| MCDL01 END);
End SP_500_SUP_REPORTASSIGN ;