Combine 3 separate tables

S

SKB

I have three tables that represent three separate mailing lists
(converted from text files). Many of the people are in all three lists.
Currently each table contains name and address information with a unique
yes/no field for their list.

Is there an easy way to combine the three tables into one table showing
which lists they are in.

for example

This;
Table1
Name| list1
yes

Table2
Name| list2
no

Table3
Name| list3
yes

To this;

Table
Name| list1| list2| list3
yes no yes

If I can just get pointed in the right direction it would be great!
Thanks in advance for any help,

SKB
 
K

KARL DEWEY

Several ways to do it. One is to first use a UNION query. I build a TEMP
table with all the names by appending all names into the TEMP.
Next use a TOTALS query with the TEMP table left join to the other three.
 
B

Bob Miller

Try this query:
SELECT Table1.Nom, Table1.List1, Table2.List2, Table3.List3
FROM (Table1 INNER JOIN Table2 ON Table1.Nom = Table2.Nom) INNER JOIN
Table3 ON Table1.Nom = Table3.Nom;
 

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