By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,953 Members | 1,161 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,953 IT Pros & Developers. It's quick & easy.

Comparing 2 like tables

P: n/a
I have 2 tables with the same fields. I would like to compare the two
tables to get a discrepancy report. Here is an example of what i would
like to see. I need to compare TableB to TableA and report the
differences.

TableA

Job# Date Amount
1 1/1/06 $15
2 1/10/06 $10
3 1/8/06 $50

TableB

Job# Date Amount
1 1/1/06 $15
2 1/10/06 $18
3 1/8/06 $60

I would like the report to say
Job# Date Amount
2 1/10/06 $8
3 1/8/06 $10

Is this doable?
thanks,
KO

Aug 23 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Should be simple:

Create a quesry with both tables linked on the Job#. Put 3 fields in
your output.

The Job# and Date from either table (Since they are the same). Add a
third field something like this:

Discrepency: TableB.Amount-TableA.Amount

Set the Criteria for the field for 0

I think this should work.
JM

Aug 23 '06 #2

P: n/a
On 22 Aug 2006 18:10:34 -0700, "Jim M" <ma*****@rci.rutgers.edu>
wrote:
>Should be simple:

Create a quesry with both tables linked on the Job#. Put 3 fields in
your output.

The Job# and Date from either table (Since they are the same). Add a
third field something like this:

Discrepency: TableB.Amount-TableA.Amount

Set the Criteria for the field for 0

I think this should work.
JM
Are the dates always going to be the same for each job number or could
that also be a discrepancy?

What if TableA.Amount is greater than TableBAmount? Perhaps criteria
should be "<0" rather than "0"?
Aug 23 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.