Subject RE: [firebird-support] Re: Need SQL help for finding non-existant records
Author Clay Shannon
<< Robert has given you a solution, but it is actually possible to do the
same thing just changing your original query from JOIN to LEFT JOIN
and moving everything referring to pchup from the WHERE clause to the
LEFT JOIN clause. The only ones you miss are those that aren't in the
empinfo_history table at all.>>

I tried Robert's SQL and got the same number of records as with my own SQL.
I changed:

> join pchup p on p.empno = s.empno

To left join pchup p on p.empno = s.empno

And got the same number of records.

I don't know what you mean by "moving everything referring to pchup from the
WHERE clause to the LEFT JOIN clause." How is that done?

Clay Shannon,
Dimension 4 Software