Finding unduplicate results

S

Smigidy

I need some programming help finding non-duplicate information in my tables.
Below is what I have in two different tables. If I try to find
non-duplicates for receipts I get 979.10, -961.57, and 602.32. If I try to
find non-duplicates for amount, I get 237.36, -961.57, and 602.32. How do I
get the last 4 rows of information as shown below?

TABLE A TABLE B
Receipt Amount Receipt Amount
A 17.53 A 17.53
B 979.10 B 979.10
C 979.10 C 979.10
D 979.10
E -961.57
F 602.32
A 237.36
 
D

Douglas J. Steele

SELECT TableB.Receipt, TableB.Amount
FROM TableB LEFT JOIN TableA
ON TableA.Receipt = TableB.Receipt
AND TableA.Amount = TableB.Amount
WHERE TableA.Receipt IS NULL
 
S

Smigidy

I'm getting a total amount of $1,237.93

Douglas J. Steele said:
SELECT TableB.Receipt, TableB.Amount
FROM TableB LEFT JOIN TableA
ON TableA.Receipt = TableB.Receipt
AND TableA.Amount = TableB.Amount
WHERE TableA.Receipt IS NULL
 
D

Douglas J. Steele

The query works for me: I get 4 rows back:

Receipt Amount
D $979.10
E -$961.57
F $606.32
A $237.36
 

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