>Thanks for your post but I'm using the code of George instead of the name.
Are you building an SP to return modules the particular person doesn't have (@PersonID)? If so, there are 2 simple ways to return your result:
select Modules.* from Modules LEFT JOJN MOdules_Assign on Modules.Code = Modules_Assign.Code and Modules_Assign.Id = @PersonID where Modules_Assign.Code IS NULL
Or
select Modules.* from Modules INNER JOIN Modules_Assign on ... where Modules_Assign.ID not IN (select ID from Names where ID = @PersonID)
BTW, I was thinking how to create an output for all people with their missing modules and I could not make this query yet in my mind. Too complex.
If it's not broken, fix it until it is.
My Blog