I have two tables one is a tasks table and the other an employees table. A third table I have is called participants. This third table holds the IDs of tasks and the IDs of employees assigned to complete those tasks. My problem is figuring out how to select employee IDs and names from the employees table that are not associated with a specific taskid in the participants table.
My first attampt was:
SELECT Employees.employeeid,Employees.username FROM Employees,Participants WHERE Participants.taskid=# AND Employees.employeeid!=Participants.employeeid.
#=any valid integer id in the taskid field of the Participants table.
This attempt just gave me everyone in the Employees table.