__IF_EXISTS__
SELECT 1
  FROM CI_UT_INSTL_DTL
WHERE SCRIPT_FILE_NAME = 'FW43001_POSTDATA2.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 sc_access_cntl (USR_GRP_ID,APP_SVC_ID,ACCESS_MODE,VERSION,OWNER_FLG) Select DISTINCT USR_GRP_ID,'CILTUSEP ', 'F1SU',VERSION,OWNER_FLG From SC_Access_CNTL A Where A.App_Svc_ID='CILTUSEP' And (A.Access_Mode = 'A' or A.Access_Mode = 'C') And Not Exists(Select 1 From Sc_Access_Cntl B Where B.Usr_Grp_ID=A.Usr_Grp_ID and B.App_Svc_ID='CILTUSEP' and B.Access_Mode='F1SU') 
/