SELECT employees.* FROM employees ; LEFT JOIN schtbld ON schtbld.schwk = CTOD("04/18/04") and AT(employees.SchedId,schtbld.schres)>0 ; WHERE schtbld.schres IS NULLYou must have a Index for schtbld.schwk, otherwise split it into two step select, or
SELECT schtbld locate for schwk = CTOD("04/18/04") SELECT * FROM employees WHERE AT(employees.SchedId,schtbld.schres)=0 or PRIVATE schwk schwk = LOOKUP(schtbld.schres,CTOD("04/18/04"),schtbld.schwk) SELECT * FROM employees WHERE AT(employees.SchedId,m.schres)=0