Query question

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

Claude Amyotte

Hi gang. I have a situation in a list box where I need to display all the
data from one table minus the data from another table(already assigned
data). I know I've done this before but for the life of me I can't get it
to work. I've tried not like and not in but doesn't seem to work - displays
all the data anyway. Thanks.

Claude.
 
SELECT * FROM FirstTable WHERE PrimaryKeyField NOT IN (SELECT
PrimaryKeyField FROM SecondTable)
 
Something like this ...

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

or, you could link on ID, if that defines the relationship.
 
Hi gang. I have a situation in a list box where I need to display all
the data from one table minus the data from another table(already
assigned data). I know I've done this before but for the life of me I
can't get it to work. I've tried not like and not in but doesn't seem
to work - displays all the data anyway. Thanks.

Claude.

Thank You!!
 

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