two tables with matching fields

  • Thread starter Thread starter Brennan
  • Start date Start date
B

Brennan

I have to two tables with field that match for the most part, but I have
fields that may not have a value in the table to match and visa versa. I
want to build a query that displays all the values that have values in both
tables and those that have a value in one or the other table. I have tried
changing the join property, but it will only give me the values from one
table, plus those that match in the second table.

Brennan
 
I have to two tables with field that match for the most part, but I have
fields that may not have a value in the table to match and visa versa. I
want to build a query that displays all the values that have values in both
tables and those that have a value in one or the other table. I have tried
changing the join property, but it will only give me the values from one
table, plus those that match in the second table.

Brennan

It sounds like what you want is a "full outer join", which is unfortunately
not supported in Access JET.

Try

SELECT <whatever>
FROM Table1 LEFT JOIN Table2 ON <appropriate join>
UNION
SELECT <whatever>
FROM Table1 RIGHT JOIN Table2 ON <appropriate join>
 

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