SELECT A.PERSON_ID , C.BO_ID , D.BO_NAME_DISPLAY , B.TEAM_ID , B.PERSON_ID , A.READONLY , A.TASK_TYPE FROM PS_RB_TSK_DELEGATE A , PS_RSF_TEAM_MBRS B , PS_RD_PERSON C , PS_BO_NAME D WHERE A.TSK_DELEGATE_TYPE = 'S' AND A.TASK_LIST = 'MT' AND A.TSK_DELEGATE_ID = B.TEAM_ID AND C.PERSON_ID = A.PERSON_ID AND D.BO_ID = C.BO_ID AND A.START_DT <= %CurrentDateIn AND A.END_DT >= %CurrentDateIn UNION SELECT A.TASK_LIST , C.BO_ID , D.BO_NAME_DISPLAY , B.TEAM_ID , B.PERSON_ID , A.READONLY , A.TASK_TYPE FROM PS_RB_TSK_DELEGATE A , PS_RSF_TEAM_MBRS B , PS_RD_PERSON C , PS_BO_NAME D WHERE A.TSK_DELEGATE_TYPE = 'S' AND (A.TASK_LIST <> 'MT' OR A.TASK_LIST <> 'DT') AND A.TSK_DELEGATE_ID = B.TEAM_ID AND C.PERSON_ID = A.TASK_LIST AND D.BO_ID = C.BO_ID AND A.START_DT <= %CurrentDateIn AND A.END_DT >= %CurrentDateIn
|