Hi Readers!

I have 2 tables, A & B, that I need to join. The only problem is that A table needs data from 2 other tables that relates to table B.



The idea is to return rows from table A that are not found in table B.

I'm trying to use a 4 way join, but I have no idea why I'm getting 'Join Expression Not Support'.

Code:
SELECT payroll.EmNbr, payroll.JNbr, payroll.wData, payroll.duration 
FROM ((AllProd_PTData as prod 
INNER JOIN ProjectJNBRData as link ON prod.program_code=link.ProgramName) 
INNER JOIN Employees_PT as emp ON prod.emp_id=emp.crt)
RIGHT JOIN dbo_tData as payroll ON payroll.JNbr=link.JNbr AND payroll.EmNber=emp.new_id AND payroll.wDate=program.pDate
WHERE payroll.ElNber IN (5215,5228) AND prod.program_code IS NULL;
I'm assuming it's because of the 3 ON conditions used for the right join. I think I should be nesting select statements someplace.

Perhaps if I SELECT FROM RIGHT JOIN (SELECT FROM JOIN ON) ON WHERE

I will have to think about this... Hmmmm