Query Question

  • Thread starter Thread starter Claude Amyotte
  • Start date Start date
C

Claude Amyotte

HI Again gang.

I posted a question a few hours ago regarding this and unfortunately I lost
the answer. Can someone please re-post it? Thanks. It was regarding a query
that has a table that I want to show all the data of except for the data in
another table. I want that data not to show in my list box(take out already
assigned data) I thought I remembered it but I can't quite get it. Thanks.

Claude.
 
Well, Brendan Reynolds gave the elegant answer ...

SELECT * FROM FirstTable WHERE PrimaryKeyField NOT IN (SELECT
PrimaryKeyField FROM SecondTable)


and I posted this ...

SELECT AllTable.ID, AllTable.TextValue
FROM AllTable
LEFT JOIN MinusTable
ON AllTable.TextValue = MinusTable.TextValue
WHERE MinusTable.TextValue IS NULL
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top