__IF_EXISTS__
SELECT 1
  FROM CI_UT_INSTL_DTL
WHERE SCRIPT_FILE_NAME = 'FW45001_POSTDATA_UGBUPD-8180.SQL'
   AND END_DTTM IS NOT NULL
/
__THEN__
__EXIT__
__ENDIF__

INSERT INTO F1_EXT_LOOKUP_VAL_CHAR (BUS_OBJ_CD, F1_EXT_LOOKUP_VALUE, CHAR_TYPE_CD, SEQ_NUM, CHAR_VAL, ADHOC_CHAR_VAL, CHAR_VAL_FK1, CHAR_VAL_FK2, CHAR_VAL_FK3, CHAR_VAL_FK4, CHAR_VAL_FK5, SRCH_CHAR_VAL, OWNER_FLG, VERSION)
SELECT V.BUS_OBJ_CD,V.F1_EXT_LOOKUP_VALUE,'F1-BSFCL',1,'BUSFLAG',' ',' ',' ',' ',' ',' ','BUSFLAG',V.OWNER_FLG,1
FROM F1_EXT_LOOKUP_VAL V
 WHERE V.BUS_OBJ_CD = 'F1-BusinessFlagStandardName'
 AND NOT EXISTS (SELECT 'X' FROM F1_EXT_LOOKUP_VAL_CHAR C WHERE C.BUS_OBJ_CD = V.BUS_OBJ_CD AND C.F1_EXT_LOOKUP_VALUE = V.F1_EXT_LOOKUP_VALUE AND C.CHAR_TYPE_CD = 'F1-BSFCL' AND SEQ_NUM = 1)
/