SQL Help - Find Employee_id in one table where it does not exist in a second table with a specified authy_type
Posted on 2011-10-05
I have two tables MSF810 and MSF872.
MSF810 stores emploee details such as EMPLOYEE_ID,SURNAME,FIRST_NAME etc
MSF872 stores the authorities each employee has on the system. Each employee has one entry in MSF872 for each authority they have and so each employee may have up to 12 entries in the MSF872
MSF810.EMPLOYEE_ID is equal to MSF872.POSITION_ID
I am trying to get EMPLOYEE_ID,SURNAME,FIRST_NAME from MSF810 where there is no entry in MSF872 for that employee with the AUTHTY_TYPE = 'WOAU' or AUTHTY_TYPE = 'WORI' in MSF872