Query problem

  • Thread starter Thread starter J.C.
  • Start date Start date
J

J.C.

I need to create a query with the resulting recordset
showing all records in Table A that do not have a record
in Table B that matches the key field. This is probably
simple, but the solution eludes me.

Table A
Column 1 - IKey (Primary Key)
Other Columns...

Table B
Column 1 - BKey (Primary Key)
Column 2 - IKey (same as Table A, Column 1,)

Result should display each row from Table A if there is no
record in Table B that matches the IKey columns.

jc
 
You might try using the "Find Unmatched Query Wizard", which you can select
from when you create a new query.

In general, the SQL for one way of doing this kind of thing might look
something like this in your case:

SELECT
A.*
FROM
A
LEFT JOIN
B
ON
A.IKey = B.IKey
WHERE
B.IKey Is Null
 
Brian -

That was what I expected: a very simple solution to a
problem that I wasn't solving. Thanks!

jc
 
Back
Top