SELECT DISTINCT TCT.SETID , MP.SUPPORT_TEAM_MBR , C.LANGUAGE_CD , C.NAME1 , MP.TEAM_MEMBER_TYPE , MT.SALES_PERSON FROM PS_CUST_TEAM CT , PS_TEAM_CODE_TBL TCT , PS_TEAM_MEMBERS TM , PS_MEMBER_PERSON MP , PS_MEMBER_TYPE_TBL MT , PS_MEMBER_PRSN_LNG C WHERE CT.SUPPORT_TEAM_CD = TCT.SUPPORT_TEAM_CD AND TCT.SETID = ( SELECT SETID FROM PS_SET_CNTRL_REC WHERE RECNAME = 'TEAM_CODE_TBL' AND SETCNTRLVALUE = CT.SETID) AND TCT.EFF_STATUS = 'A' AND %EffdtCheck(TEAM_CODE_TBL TCT2, TCT, %CurrentDateIn) AND TM.SETID = TCT.SETID AND TM.SUPPORT_TEAM_CD = TCT.SUPPORT_TEAM_CD AND TM.EFFDT = TCT.EFFDT AND MP.SETID = TM.SETID AND MP.SUPPORT_TEAM_MBR = TM.SUPPORT_TEAM_MBR AND MT.SETID = MP.SETID AND MT.TEAM_MEMBER_TYPE = MP.TEAM_MEMBER_TYPE AND MT.EFF_STATUS = 'A' AND %EffdtCheck(MEMBER_TYPE_TBL MT2, MT, %CurrentDateIn) AND MT.SALES_PERSON = 'Y' AND MP.SETID = C.SETID AND MP.SUPPORT_TEAM_MBR = C.SUPPORT_TEAM_MBR
|