Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004

    Unanswered: need to list values in one table missing from another

    Hi folks

    I've been battling with this for hours.

    I have two tables, Categories and Items - both have a category_name field.

    I need a list of the category_names in Categories that are NOT contained in Items.

    I'm sure it must be possible to create a query to do this, but how?

    Any help would be much appreciated.


  2. #2
    Join Date
    Jan 2004
    I've solved my own problem. I had the wrong type of join. The following works:

    SELECT categories.category_name, items.category_name
    FROM items RIGHT JOIN categories ON items.category_name = categories.category_name
    GROUP BY categories.category_name, items.category_name
    HAVING (((items.category_name) Is Null))

    I need to go back to school

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts