Hi All,
I'm pretty sure what I'm looking to do is not too complicated, but can't figure out how to write the query. I'm trying to get all records from one table that does not show up in two other tables. I currently have two queries similar to the following:
And
Is there a way to combine theses into one query, or am I going about the wrong way? Any help is greatly appreciated.
Tim
I'm pretty sure what I'm looking to do is not too complicated, but can't figure out how to write the query. I'm trying to get all records from one table that does not show up in two other tables. I currently have two queries similar to the following:
Code:
SELECT tableA.item1, COUNT(tableB.item1)
FROM tableA LEFT OUTER JOIN tableB
ON tableB.item1 = tableA.item1
HAVING COUNT(tableB.item1) < 1
And
Code:
SELECT tableA.item1, COUNT(tableC.item1)
FROM tableA LEFT OUTER JOIN tableC
ON tableC.item1 = tableA.item1
HAVING COUNT(tableC.item1) < 1
Is there a way to combine theses into one query, or am I going about the wrong way? Any help is greatly appreciated.
Tim