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

Insert into sc_usr_grp_prof (USR_GRP_ID,APP_SVC_ID,EXPIRATION_DT,VERSION,OWNER_FLG) Select USR_GRP_ID,'F1-DFLTS',EXPIRATION_DT,1,OWNER_FLG From sc_usr_grp_prof A Where A.App_Svc_Id = 'F1-DFLTAPS' and Not Exists(Select 1 From sc_usr_grp_prof B Where B.USR_GRP_ID=A.USR_GRP_ID And B.App_Svc_ID='F1-DFLTS')
/
Insert into sc_access_cntl (USR_GRP_ID,APP_SVC_ID,ACCESS_MODE,VERSION,OWNER_FLG) Select USR_GRP_ID,'F1-DFLTS','F1EX',1,OWNER_FLG From SC_Access_CNTL A Where A.App_Svc_ID='F1-DFLTAPS' And Not Exists(Select 1 From Sc_Access_Cntl B Where B.Usr_Grp_ID=A.Usr_Grp_ID and B.App_Svc_ID='F1-DFLTS' and B.Access_Mode='F1EX')
/
Insert into sc_usr_grp_prof (USR_GRP_ID,APP_SVC_ID,EXPIRATION_DT,VERSION,OWNER_FLG) Select USR_GRP_ID,'F1-DFLTS',EXPIRATION_DT,1,OWNER_FLG From sc_usr_grp_prof A Where A.App_Svc_Id = 'FWLZDEXP' and Not Exists(Select 1 From sc_usr_grp_prof B Where B.USR_GRP_ID=A.USR_GRP_ID And B.App_Svc_ID='F1-DFLTS')
/
Insert into sc_access_cntl (USR_GRP_ID,APP_SVC_ID,ACCESS_MODE,VERSION,OWNER_FLG) Select USR_GRP_ID,'F1-DFLTS','F1EX',1,OWNER_FLG From SC_Access_CNTL A Where A.App_Svc_ID='FWLZDEXP' And Not Exists(Select 1 From Sc_Access_Cntl B Where B.Usr_Grp_ID=A.Usr_Grp_ID and B.App_Svc_ID='F1-DFLTS' and B.Access_Mode='F1EX')
/
UPDATE CI_ZONE SET APP_SVC_ID = 'F1-DFLTS' WHERE APP_SVC_ID in ('F1-DFLTAPS', 'FWLZDEXP')
/
UPDATE F1_BUS_OBJ SET APP_SVC_ID = 'F1-DFLTS' WHERE APP_SVC_ID in ('F1-DFLTAPS', 'FWLZDEXP')
/
UPDATE F1_BUS_SVC SET APP_SVC_ID = 'F1-DFLTS' WHERE APP_SVC_ID in ('F1-DFLTAPS', 'FWLZDEXP')
/
UPDATE CI_SCR SET APP_SVC_ID = 'F1-DFLTS' WHERE APP_SVC_ID in ('F1-DFLTAPS', 'FWLZDEXP')
/
UPDATE CI_MD_SVC SET APP_SVC_ID = 'F1-DFLTS' WHERE APP_SVC_ID in ('F1-DFLTAPS', 'FWLZDEXP')
/
UPDATE CI_MD_NAV SET APP_SVC_ID = 'F1-DFLTS' WHERE APP_SVC_ID in ('F1-DFLTAPS', 'FWLZDEXP')
/
UPDATE CI_MD_RPT SET APP_SVC_ID = 'F1-DFLTS' WHERE APP_SVC_ID in ('F1-DFLTAPS', 'FWLZDEXP')
/
UPDATE CI_BATCH_CTRL SET APP_SVC_ID = 'F1-DFLTS' WHERE APP_SVC_ID in ('F1-DFLTAPS', 'FWLZDEXP')
/
UPDATE CI_MD_MENU_ITEM SET APP_SVC_ID = 'F1-DFLTS' WHERE APP_SVC_ID in ('F1-DFLTAPS', 'FWLZDEXP')
/