__IF_EXISTS__
SELECT 1
  FROM CI_UT_INSTL_DTL
 WHERE SCRIPT_FILE_NAME = 'FW410_POSTDATA8.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_FK_REF set zone_cd = 'F1-APSVCSRCH' where fk_ref_cd= 'APP-SVC' and RTRIM(zone_cd) IS NULL
/

update CI_FK_REF set zone_cd = 'F1-ALGSRCH' where fk_ref_cd= 'F1-ALG' and RTRIM(zone_cd) IS NULL
/

update CI_FK_REF set zone_cd = 'F1-ALGSRCH' where fk_ref_cd= 'ALG' and RTRIM(zone_cd) IS NULL
/

update CI_FK_REF set zone_cd = 'F1-FLDSRCH' where fk_ref_cd= 'F1-FLD' and RTRIM(zone_cd) IS NULL
/

update CI_FK_REF set zone_cd = 'F1-MSGCATSCH' where fk_ref_cd= 'MSGCAT' and RTRIM(zone_cd) IS NULL
/

update CI_FK_REF set zone_cd = 'F1-MSGSRCH' where fk_ref_cd= 'F1-MSG' and RTRIM(zone_cd) IS NULL
/

update CI_FK_REF set zone_cd = 'F1-USGRSRCH' where fk_ref_cd= 'F1-UGUSR' and RTRIM(zone_cd) IS NULL
/

update CI_FK_REF set zone_cd = 'F1-USSRCH' where fk_ref_cd= 'CI_USER' and RTRIM(zone_cd) IS NULL
/

update CI_FK_REF set zone_cd = 'F1-UISRC' where fk_ref_cd= 'F1-UIMAP' and RTRIM(zone_cd) IS NULL
/

update CI_FK_REF set zone_cd = 'F1-DASRCH' where fk_ref_cd= 'F1-DATAR' and RTRIM(zone_cd) IS NULL
/

update CI_FK_REF set zone_cd = 'F1-SCSRCH' where fk_ref_cd= 'F1-BPASC' and RTRIM(zone_cd) IS NULL
/

update CI_FK_REF set zone_cd = 'F1-SCSRCH' where fk_ref_cd= 'F1-SCRCD' and RTRIM(zone_cd) IS NULL
/

update CI_FK_REF set zone_cd = 'F1-SCSRCH' where fk_ref_cd= 'F1-SCR' and RTRIM(zone_cd) IS NULL
/

update CI_FK_REF set zone_cd = 'F1-BOSRCH' where fk_ref_cd= 'F1-BUS' and RTRIM(zone_cd) IS NULL
/

update CI_FK_REF set zone_cd = 'F1-BOSRCH' where fk_ref_cd= 'F1-BUSOB' and RTRIM(zone_cd) IS NULL
/
