SELECT DISTINCT C.BUSINESS_UNIT , A.TEAM_ID , B.PERSON_ID , A.DESCR , P.OPRID FROM PS_SPB_TEAM A , PS_SPB_MEM_BY_TEAM B , PS_SPF_WORDERREC C , PS_SET_CNTRL_GROUP S , PSOPRALIAS P WHERE A.SETID =B.SETID AND A.TEAM_ID= B.TEAM_ID AND A.EFFDT=B.EFFDT AND A.TEAM_TYPE = B.TEAM_TYPE AND A.EFF_STATUS = 'A' AND B.TEAM_TYPE = 'SC' AND C.BUSINESS_UNIT = S.SETCNTRLVALUE AND S.REC_GROUP_ID = 'SP_02' AND B.SETID = S.SETID AND %EffdtCheck(SPB_TEAM,A,%CurrentDateIn) AND P.PERSON_ID = B.PERSON_ID AND P.OPRALIASTYPE = 'SPP'
|