Append two tables into a query

S

shm135

I have two tables. There are no primary keys.

Table 1 is imported from an excel file and has the following
information, and can have records that are exact repeats:
Location Code
Item Code
Description
Location Address

Table 2 is manually updated and has the following fields, and there
are no records that are completely, exactly the same:
Location Code
Item Code
Description
Location Address
[Originate or Terminate?]

I want a query to show me all of the records in table 1, and include
the [Originate or Terminate?] field from TABLE 2 only if the Location/
Item Code, Description and Location Address are an exact match between
the two. I tried creating a relationship, but it returns only the
table 1 results that have equal table 2 counterparts. I want to see
all of the table 1 fields, and IF there is an equal counterpart, then
I want to include that, otherwise the [Originate or Terminate] field
needs to stay blank. Please help me out. Thank you!
 
G

golfinray

In Access, exact repeats are called "duplicates" and are a big no-no. You
have a Find Duplicates query that will find those and you either need to put
those over in a different table or delete them. Then you have to have keys,
either supplied by you or an autonumber so that the information in one table
has the basis of a relationship in the other. Right now, you basically have
none. Look in help under keys and google Access relationships.
 

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