I have a table A {id, foo, ...} and a table B {id, boo, idA} I want all objects in A that identifiers do not appear in B
in Oracle SQL will look like this:
SELECT id FROM A MINUS( SELECT idA FROM B);
Easier than I thought, I focused on the minus
select a.id from A as a where a.id not in (select idA from B)
thanks
The MINUS function does not exist in HQL, go here to paragraph 14.10. Expressions.
Try the following:
SELECT id FROM A WHERE NOT EXISTS (SELECT 'X' FROM B WHERE B.idA = A.id)