SELECT AUTH_UID.SAE_GRP_AUTHUSERID ,GRP.SAE_GROUP_NO ,GRP.SAE_GROUP_NAME ,GRP.SAE_GRP_BEGIN_DT ,GRP.SAE_GRP_END_DT FROM %Table(SAE_GRP_AUTHS) AUTH_UID , %Table(SAE_GROUP_TBL) GRP WHERE AUTH_UID.SAE_GROUP_NO = GRP.SAE_GROUP_NO AND AUTH_UID.SAE_GRP_AUTH_TYPE = 'U' UNION SELECT DISTINCT ROLEUSER2.ROLEUSER ,GRP2.SAE_GROUP_NO ,GRP2.SAE_GROUP_NAME ,GRP2.SAE_GRP_BEGIN_DT ,GRP2.SAE_GRP_END_DT FROM PS_SAE_GRP_AUTHS AUTH_ROLE2 , PS_SAE_GROUP_TBL GRP2 , PSROLEUSER ROLEUSER2 WHERE AUTH_ROLE2.SAE_GROUP_NO = GRP2.SAE_GROUP_NO AND AUTH_ROLE2.SAE_GRP_AUTH_TYPE = 'R' AND ROLEUSER2.ROLENAME = AUTH_ROLE2.SAE_GRP_AUTHROLE
|