If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Append two tables into a query
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! |
#2
|
|||
|
|||
Append two tables into a query
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. -- Milton Purdy ACCESS State of Arkansas "shm135" wrote: 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! |
Thread Tools | |
Display Modes | |
|
|