Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

querying all entries in one table that aren't in the other one

0 views
Skip to first unread message

n.be...@gmail.com

unread,
Feb 14, 2007, 3:46:09 PM2/14/07
to
Hi,

I have 2 tables linked to each other by a field. I'd like to query all
the enteries in one table that aren't in the other one, based on that
field. Any suggestions?

pietl...@hotmail.com

unread,
Feb 14, 2007, 4:22:55 PM2/14/07
to

Here's an example...
Customers is the table that always has values (because you can't have
an invoice without a customer). Say I want to see any Customers
without Invoices.

SELECT Customers.CompanyName, Invoices.InvoiceID
FROM Customers LEFT JOIN Invoices ON Customers.CustomerID =
Invoices.CustomerID
WHERE (((Invoices.InvoiceID) Is Null));

Larry Linson

unread,
Feb 15, 2007, 3:02:23 AM2/15/07
to
<n.be...@gmail.com> wrote

> I have 2 tables linked to each other by a field. I'd like to query all
> the enteries in one table that aren't in the other one, based on that
> field. Any suggestions?

Is there some particular reason that you cannot use the "Find Unmatched
Wizard" in the Query Builder? In the Query Tab of the DB Window, click New,
then one option will be the "Find Unmatched Wizard".

Larry Linson
Microsoft Access MVP


n.be...@gmail.com

unread,
Apr 3, 2007, 10:19:20 AM4/3/07
to

Thanks so much for all your help!

0 new messages