SELECT DISTINCT B.BUSINESS_UNIT , B.VMS_SUPPLIER_ID , A.TEAM_ID , A.DESCR FROM PS_SPB_TEAM A , PS_SPB_VMS_INFO_SR B , PS_SPB_VMS_INFO_BU C WHERE (A.TEAM_ID = B.VMS_TEAM_ID OR A.TEAM_ID = C.TEAM_ID) AND B.BUSINESS_UNIT = C.BUSINESS_UNIT AND B.VMS_SUPPLIER_ID = C.VMS_SUPPLIER_ID AND B.EFF_STATUS = 'A' AND %EffdtCheck(SPB_VMS_INFO_SR,B,%CurrentDateIn) AND C.EFF_STATUS = 'A' AND %EffdtCheck(SPB_VMS_INFO_BU,C,%CurrentDateIn) AND A.SETID = ( SELECT D.SETID FROM PS_SET_CNTRL_GROUP D WHERE D.SETCNTRLVALUE = B.BUSINESS_UNIT AND REC_GROUP_ID = 'SP_02')
|