INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

need a query to display all records in one table except items in a second table

need a query to display all records in one table except items in a second table

need a query to display all records in one table except items in a second table

(OP)
I have two tables and I want to display all the records that are in Ord_tbl who's System field does not
match the PartsDesc field in my IOM_tbl but am not able to get the query set up correctly.

Here is what my query looks like but it is displaying all records in the Ord_tbl:

CODE -->

SELECT Ord_tbl.Date, Ord_tbl.Cust_Name, Ord_tbl.System
FROM Ord_tbl LEFT JOIN IOM_tbl ON Ord_tbl.[System] = IOM_tbl.[PartDesc]; 

What am I missing?

Thanks

RE: need a query to display all records in one table except items in a second table

SELECT Ord_tbl.Date, Ord_tbl.Cust_Name, Ord_tbl.System
FROM Ord_tbl LEFT JOIN IOM_tbl ON Ord_tbl.[System] = IOM_tbl.[PartDesc]
WHERE IOM_tbl.[PartDesc] is null

RE: need a query to display all records in one table except items in a second table

(OP)
Thanks MajP !

RE: need a query to display all records in one table except items in a second table

However there are several ways to do this, and they are slightly different in how they work. You may want to become familiar with these:
https://explainextended.com/2009/09/15/not-in-vs-n...

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close