Looking for changes in records after update

M

martinmike2

Hello,

I am trying to find changes in one table by using another table. The
first table has the "live" data. The second table has the
"historical" data.

I am trying to find any changes that may have taken place after
running an update query. The problem is, I need to find changes in
the whole record, not just a single field, or I would use the
unmatched query.
 
T

Tom van Stiphout

On Wed, 29 Oct 2008 07:23:16 -0700 (PDT), martinmike2

You can still use the unmatched query, but first create two queries:
each one for one of your tables, and it will concatenate all the table
values into a single column:
select CStr(CustomerID) & "-" & CustomerName & "-" & City & "-" &
State ... etc. ... as AllData
Then choose these two queries for the unmatched query.

-Tom.
Microsoft Access MVP
 
M

martinmike2

Tom, It didn't work.

Here's what I have:

Query2:
SELECT CStr([bin] & ", " & [bsc] & ", " & [title] & ", " & [r_pnec] &
", " & [r_snec] & ", " & [a_rtabbr]) AS Astr
FROM tblAMD;

Query3:
SELECT CStr([bin] & ", " & [bsc] & ", " & [title] & ", " & [r_pnec] &
", " & [r_snec] & ", " & [a_rtabbr]) AS Bstr
FROM tblAMDHIST;

Query4:
SELECT Query3.Bstr
FROM Query3 LEFT JOIN Query2 ON Query3.Bstr = Query2.Astr
WHERE (((Query2.Astr) Is Null));

Reversing Query4 has no effect. Both versions produce no results, but
I know there are at least 5 changes.
 

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