With SQL it is very easy to find rows in one table not found in another table ( on the same server ).
I have been out of touch with Advantage SQL. But I can site several constructs used for this purpose.
'MINUS' in Oracle or 'EXCEPT' in MS Sql are ( opposite of UNION ) are used to list the differences.
SELECT EmpNo, EmpName
FROM EmployeeRecord
WHERE Salery > 1000
MINUS
SELECT EmpNo, EmpName
FROM EmployeeRecord
WHERE Salery > 2000
ORDER BY EmpName;
If our SQL does not support MINUS or EXCEPT, we can always use 'NOT EXISTS' or 'NOT IN' in any SQL. Also we can use 'OUTER JOIN' and filter for NULL values.
SELECT *
FROM suppliers
WHERE not exists (select * from orders Where suppliers.supplier_id = orders.supplier_id);
or
SELECT EmpNum, EmpName
FROM EMPOLYEES
WHERE EmpNum NOT IN
(SELECT EmpNum FROM Table2)