__IF_EXISTS__
SELECT 1
  FROM CI_UT_INSTL_DTL
 WHERE SCRIPT_FILE_NAME = 'FW43000_POSTDATA1.SQL'
   AND END_DTTM IS NOT NULL
/
__THEN__

__EXIT__

__ENDIF__

__IF_EXISTS__
SELECT 1
  FROM CI_INSTALL_PROD
 WHERE INSTALL_OPT_ID = '11111'
   AND OWNER_FLG = 'F1'
/
__ELSE__

__EXIT__

__ENDIF__


UPDATE CI_ZONE_HDL_PRM B
SET B.ZONE_HDL_PARM_VAL =
  (SELECT SUBSTR(A.ZONE_HDL_PARM_VAL,0,INSTR(A.ZONE_HDL_PARM_VAL, '[',1,1))
    || REPLACE(REPLACE(SUBSTR(A.ZONE_HDL_PARM_VAL,INSTR(A.ZONE_HDL_PARM_VAL, '[',1,1)+1,INSTR(A.ZONE_HDL_PARM_VAL,']',1,1)-INSTR(A.ZONE_HDL_PARM_VAL, '[',1)-1),'''',''),'"','')
    || SUBSTR(A.ZONE_HDL_PARM_VAL,INSTR(A.ZONE_HDL_PARM_VAL,']',1,1),INSTR(A.ZONE_HDL_PARM_VAL, '[',1,1))
  FROM CI_ZONE_HDL_PRM A
  WHERE A.ZONE_HDL_PRM_NAME LIKE 'IMPLEMENTOR_ACTION%'
  AND (A.ZONE_HDL_PARM_VAL LIKE '%context=[%''%]%' OR A.ZONE_HDL_PARM_VAL LIKE '%context=[%"%]%')
  AND A.ZONE_HDL_CD       = B.ZONE_HDL_CD
  AND A.ZONE_HDL_PRM_NAME = B.ZONE_HDL_PRM_NAME
  )
WHERE B.ZONE_HDL_PRM_NAME LIKE 'IMPLEMENTOR_ACTION%'
AND B.OWNER_FLG = 'CM'
AND (B.ZONE_HDL_PARM_VAL LIKE '%context=[%''%]%' OR B.ZONE_HDL_PARM_VAL LIKE '%context=[%"%]%')
/


UPDATE CI_ZONE_HDL_PRM B
SET B.ZONE_HDL_PARM_OVRD =
  (SELECT SUBSTR(A.ZONE_HDL_PARM_OVRD,0,INSTR(A.ZONE_HDL_PARM_OVRD, '[',1,1))
    || REPLACE(REPLACE(SUBSTR(A.ZONE_HDL_PARM_OVRD,INSTR(A.ZONE_HDL_PARM_OVRD, '[',1,1)+1,INSTR(A.ZONE_HDL_PARM_OVRD,']',1,1)-INSTR(A.ZONE_HDL_PARM_OVRD, '[',1)-1),'''',''),'"','')
    || SUBSTR(A.ZONE_HDL_PARM_OVRD,INSTR(A.ZONE_HDL_PARM_OVRD,']',1,1),INSTR(A.ZONE_HDL_PARM_OVRD, '[',1,1))
  FROM CI_ZONE_HDL_PRM A
  WHERE A.ZONE_HDL_PRM_NAME LIKE 'IMPLEMENTOR_ACTION%'
  AND (A.ZONE_HDL_PARM_OVRD LIKE '%context=[%''%]%' OR A.ZONE_HDL_PARM_OVRD LIKE '%context=[%"%]%')
  AND A.ZONE_HDL_CD       = B.ZONE_HDL_CD
  AND A.ZONE_HDL_PRM_NAME = B.ZONE_HDL_PRM_NAME
  )
WHERE B.ZONE_HDL_PRM_NAME LIKE 'IMPLEMENTOR_ACTION%'
AND (B.ZONE_HDL_PARM_OVRD LIKE '%context=[%''%]%' OR B.ZONE_HDL_PARM_OVRD LIKE '%context=[%"%]%')
/



UPDATE CI_ZONE_PRM B
SET B.ZONE_PARM_VAL =
  (SELECT SUBSTR(A.ZONE_PARM_VAL,0,INSTR(A.ZONE_PARM_VAL, '[',1,1))
    || REPLACE(REPLACE(SUBSTR(A.ZONE_PARM_VAL,INSTR(A.ZONE_PARM_VAL, '[',1,1)+1,INSTR(A.ZONE_PARM_VAL,']',1,1)-INSTR(A.ZONE_PARM_VAL, '[',1)-1),'''',''),'"','')
    || SUBSTR(A.ZONE_PARM_VAL,INSTR(A.ZONE_PARM_VAL,']',1,1),INSTR(A.ZONE_PARM_VAL, '[',1,1))
  FROM CI_ZONE_PRM A
  WHERE A.ZONE_HDL_PRM_NAME LIKE 'OVRD_IMPL_ACTION%'
  AND (A.ZONE_PARM_VAL LIKE '%context=[%''%]%' OR A.ZONE_PARM_VAL LIKE '%context=[%"%]%')
  AND A.ZONE_CD           = B.ZONE_CD
  AND A.ZONE_HDL_CD       = B.ZONE_HDL_CD
  AND A.ZONE_HDL_PRM_NAME = B.ZONE_HDL_PRM_NAME
  )
WHERE B.ZONE_HDL_PRM_NAME LIKE 'OVRD_IMPL_ACTION%'
AND B.OWNER_FLG = 'CM'
AND (B.ZONE_PARM_VAL LIKE '%context=[%''%]%' OR B.ZONE_PARM_VAL LIKE '%context=[%"%]%')
/




UPDATE CI_ZONE_PRM B
SET B.ZONE_PARM_VAL_OVRD =
  (SELECT SUBSTR(A.ZONE_PARM_VAL_OVRD,0,INSTR(A.ZONE_PARM_VAL_OVRD, '[',1,1))
    || REPLACE(REPLACE(SUBSTR(A.ZONE_PARM_VAL_OVRD,INSTR(A.ZONE_PARM_VAL_OVRD, '[',1,1)+1,INSTR(A.ZONE_PARM_VAL_OVRD,']',1,1)-INSTR(A.ZONE_PARM_VAL_OVRD, '[',1)-1),'''',''),'"','')
    || SUBSTR(A.ZONE_PARM_VAL_OVRD,INSTR(A.ZONE_PARM_VAL_OVRD,']',1,1),INSTR(A.ZONE_PARM_VAL_OVRD, '[',1,1))
  FROM CI_ZONE_PRM A
  WHERE A.ZONE_HDL_PRM_NAME LIKE 'OVRD_IMPL_ACTION%'
  AND (A.ZONE_PARM_VAL_OVRD LIKE '%context=[%''%]%' OR A.ZONE_PARM_VAL_OVRD LIKE '%context=[%"%]%')
  AND A.ZONE_CD           = B.ZONE_CD
  AND A.ZONE_HDL_CD       = B.ZONE_HDL_CD
  AND A.ZONE_HDL_PRM_NAME = B.ZONE_HDL_PRM_NAME
  )
WHERE B.ZONE_HDL_PRM_NAME LIKE 'OVRD_IMPL_ACTION%'
AND (B.ZONE_PARM_VAL_OVRD LIKE '%context=[%''%]%' OR B.ZONE_PARM_VAL_OVRD LIKE '%context=[%"%]%')
/

