merging tables

C

CJ

I have 1 table with the headings ID, Easting, Northing,
Channel response, and comments. I have another table
with the headings Anomaly ID, Easting, Northing, and
description. The 2 tables have the Easting and Northing
in common. I want to link the 2 tables by the Easting
and Northing so my result is ID, Channel response,
comments, Anomaly ID, and description all in the same
table that has the Easting and Northing in common.

I would like everything in 1 table but I need to be able
to match them up by the Easting and Northings. How would
I go about this.
 
C

Chris

Try the following SQL:

SELECT table1.*, table2.[Anomaly ID], table2.description
FROM table1 LEFT JOIN table2 ON ((table1.Northing =
table2.Northing) AND (table1.Easting = table2.Easting));

HTH

Chris
 
J

John Vinson

I have 1 table with the headings ID, Easting, Northing,
Channel response, and comments. I have another table
with the headings Anomaly ID, Easting, Northing, and
description. The 2 tables have the Easting and Northing
in common. I want to link the 2 tables by the Easting
and Northing so my result is ID, Channel response,
comments, Anomaly ID, and description all in the same
table that has the Easting and Northing in common.

I would like everything in 1 table but I need to be able
to match them up by the Easting and Northings. How would
I go about this.

Simply create a new Query; join Easting to Easting, Northing to
Northing, and select whatever fields you want to see.

If you really want to create a (redundant) third table you can make
this query into a MakeTable query; however, if the tables have valid
existances of their own, you can just use the Query as if it were a
Table, as the recordsource for a form or report, or to be exported to
a file.
 

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