I'm trying to find all rows in a table where a pair of values is not in anther table: that is, I want to do something like this:

  SELECT * FROM x WHERE (a,b) NOT IN (SELECT DISTINCT a,b FROM y);

which of course doesn't work.

At the moment I've bodged around it by doing this:

SELECT * FROM x WHERE a||'-'||b NOT IN (SELECT DISTINCT a||'-'||b FROM y);

but this strikes me as really ugly. Can anyone a more elegant way to get what I want?

TIA,
--
John English

Reply via email to