Extract info from Multiple Tables & combine into 1

J

johnnyd

I have 3 Tables titled [liquidated], [lossAmt] and [EFD]. These tables were
created using selection queries. They all contain identical fields but they
all contain different data within the fields

I need to combine these tables into 1 table titled [COMPLETED]

However, I need to extract only the information from each of the 3 tables
that is identical. How can i do this?
 
M

Michel Walsh

SELECT table1.f1, table1.f1, table1.f3
FROM( table1 INNER JOIN table2
ON table1.f1=table2.f1
AND table1.f2=table2.f1
AND table1.f3=table2.f3)
INNER JOIN table3
ON table1.f1=table3.f1
AND table1.f2=table3.f1
AND table1.f3=table3.f3



Assuming you have only three fields, f1, f2 and f3.
Assuming there is no duplicated triple (f1, f2, f3), ie, the three fields,
together, could make a primary key (or at least, an index with no duplicate,
a duplicate being based on the triple-values considered as a single
entity). That last assumption can be removed, though, with a little more
complex query.



Vanderghast, Access MVP
 

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