A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Append two tables into a query



 
 
Thread Tools Display Modes
  #1  
Old October 7th, 2009, 07:16 PM posted to microsoft.public.access.queries
shm135
external usenet poster
 
Posts: 26
Default 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  
Old October 7th, 2009, 08:20 PM posted to microsoft.public.access.queries
Golfinray
external usenet poster
 
Posts: 1,597
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:22 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.