Thursday, July 28, 2016

Update table with Join PL SQL


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 ;

Wednesday, July 27, 2016

SP_Help in PLSQL

Select * from user_constraints where table_name='TBL500_BUSUPACCESS';