cross reference tables using a query

G

Guest

I have two tables that I am trying to cross reference.

Table 1 contains a single column list of telephone numbers

Table 2 contains two columns. Column 1 contains people's names and column 2
contains their telephone number.

I'm trying to cross reference the two tables to get a list that shows the
name of each person that is associated with each of the telephone numbers in
Table 1.

Please help, trying to do it manually is driving me MAD!
 
G

Guest

Create a query that includes both table and join them by inner join by the
phone number

SELECT Table2.*
FROM Table2 INNER JOIN Table1 ON Table2.PhoneNumber= Table1.PhoneNumber
 
G

Guest

Thank you very much, that makes life much easier

Ofer said:
Create a query that includes both table and join them by inner join by the
phone number

SELECT Table2.*
FROM Table2 INNER JOIN Table1 ON Table2.PhoneNumber= Table1.PhoneNumber
 
G

Guest

how best do I produce a list of the phone numbers in the phone numbers table
that were not matched to any entry in the phone numbers and person name
table, please?

I have tried reversing the INNER JOIN Query but without success.

If I could do that I would then have a list of those entries that appeared
in both tables and those that don't.

Thanks again in anticipation.
 
G

Guest

Create a new query using the query wizard, with the wizard you can select un
matched records, that will build the query automatically to return all the
records that apear in one table but not in the other.
If you need help, post the sql you have with the inner join that returnes
the match records, I'll help you with the second query
 

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

Top