finding addresses that have changed

T

Thrava

Hello everyone,

I have two tables, both have the same exact structure.

Table 1 has a customer name field and address, city, zip.
This table was from 6 months ago.

Table 2 is the same table but with updated addresses as of
last week.

I like to only query and see those customers that have a
different addresses between table 1 and 2. No matter
which table it is from.

How do I do that?
 
S

SirPoonga

Depends on how your data is.
I assume Customer name is the primary key for both tables. A
relationship should be setup between those fields then.

Assuming you are in query builder...
To get All the customers from that are in both Table 1 and table 1 you
use a normal inner join (join properties 1).
From there to get the customers in table 1 that have a different
address in table to you will need to drag the Table 1 customer name
field tot he design grid. For criteria you will need '<>
[Table2].[Customer Name]'
 
S

SirPoonga

Depends on how your data is.
I assume Customer name is the primary key for both tables. A
relationship should be setup between those fields then.


Assuming you are in query builder...
To get All the customers from that are in both Table 1 and table 1 you
use a normal inner join (join properties 1).
From there to get the customers in table 1 that have a different
address in table to you will need to drag the Table 1 customer name
field tot he design grid. For criteria you will need '<>
[Table2].[Customer Name]'

Also, to learn how to use queries open up Microsoft Access's help. In
the contents tab goto "Working With Queries". In this case you;d want
to read about "Creating Select Queries"
 
G

Guest

hi,
there is a query wizard for that.
click new query then find unmatched query wizard.
there is a similar query. find duplicates which will find
all entries that are the same in both tables.
regards
 
M

Micah Chaney

Create a select Query. Name it Filter_Sub (or something Sub). Make sure the
two tables have a value unique to the records. For example a Customer ID
number or something.
Create two fields as follows:

AddressTable1: [Table1].[Address]&" "&[Table1].[Address2]&"
"&[Table1].[City]&" "&[Table1].[State]&" "&[Table1].[Zip] (or however your
fields are named)

AddressTable2: [Table2].[Address]&" "&[Table2].[Address2]&"
"&[Table2].[City]&" "&[Table2].[State]&" "&[Table2].[Zip] (or however your
fields are named)

Save this Query. Create a new Query based off this sub Query. Bring both
fields down and utilize the following criteria for [AddressTable1]:
<>[AddressTable2]

This will allow you to view changed address at any given point in time,
without having to rerun or recreate any queries. However, this allows
read-only viewing only. Also displays the data for both tables, so you have
the old address and new address.
Hope this helps.
 
S

SirPoonga

whoops, my bad, you need to find where the address is change, not
customer name. You will have to test based on address info.
 
Top