Make table Query

  • Thread starter Thread starter Paul Tri via AccessMonster.com
  • Start date Start date
P

Paul Tri via AccessMonster.com

I have 2 tables that have different customer information. What I would
like to do is the following. If the addresses match on both tables I would
like all of the information for that person from both tables to write into
another table. Is this possible? Can someone help me with this?

Thanks in advance!!

Paul
 
This query will create a new table called CustomerMainTable, getting data
from two customers tables joining the address field

SELECT MyTable.CustomerAddress, MyTable.CustPhone, MyTable2.CustFax INTO
CustomerMainTable
FROM MyTable2 INNER JOIN MyTable ON MyTable2.CustomerAddress =
MyTable.CustomerAddress

oe the other option will be to use an append query, that will insert data
into another table
 
Paul said:
I have 2 tables that have different customer information. What I would
like to do is the following. If the addresses match on both tables I would
like all of the information for that person from both tables to write into
another table. Is this possible? Can someone help me with this?

Thanks in advance!!

Paul

Can be done from the design view:

Into a NEW table:

SELECT table1.*
INTO NewTable
FROM table1
INNER JOIN table2
ON table1.address = table2.address


Into existing table:

INSERT INTO table3
SELECT table1.*
FROM table1
INNER JOIN table2
ON table1.address = table2.address

Hth
PerL
 
Back
Top