__IF_EXISTS__
SELECT 1
  FROM CI_UT_INSTL_DTL
WHERE SCRIPT_FILE_NAME = 'FW43060_POSTDATA_OUAF-7927.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__

INSERT INTO F1_ATTACHMENT_K (ATTACHMENT_ID,ENV_ID) (select a.ATTACHMENT_ID ,b.ENV_ID from F1_ATTACHMENT a, F1_INSTALLATION b)
/
INSERT INTO F1_STATS_SNPSHT_k (SNAPSHOT_ID,ENV_ID) (select a.SNAPSHOT_ID,b.ENV_ID from F1_STATS_SNPSHT  a, F1_INSTALLATION b)
/
INSERT INTO F1_ERASURE_SCHED_K (ERASURE_SCHED_ID,ENV_ID) (select a.ERASURE_SCHED_ID,b.ENV_ID from F1_ERASURE_SCHED  a, F1_INSTALLATION b)
/
INSERT INTO F1_DEPLOYMENT_K (F1_DEPLOYMENT_ID,ENV_ID) (select a.F1_DEPLOYMENT_ID,b.ENV_ID from F1_DEPLOYMENT  a, F1_INSTALLATION b)
/
INSERT INTO F1_MDT_K (F1_MDT_ID,ENV_ID) (select a.F1_MDT_ID,b.ENV_ID from F1_MDT  a, F1_INSTALLATION b)
/
INSERT INTO F1_REMOTE_MSG_K (F1_REMOTE_MSG_ID,ENV_ID) (select a.F1_REMOTE_MSG_ID,b.ENV_ID from F1_REMOTE_MSG  a, F1_INSTALLATION b)
/
