Unmatched on 1 field where other field is equal

R

Rachael

I want to create a query to compare two tables (my insurance premium billing
list vs carrier billing list) and return records where the billing amounts
are different for the same employee. I think I'm making this more complicated
than it needs to be.

Both tables have fields SSN and Premium. I want to see where SSN matches,
but Premium does not.

Can you help?
 
J

John Spencer

SELECT *
FROM Insurance INNER JOIN Carrier
ON Insurance.SSN = Carrier.SSN
WHERE Insurance.Premium <> Carrier.Premium

In the query grid
-- add both tables
-- drag from SSN to SSN to set up the relationship
-- Add the fields you want to see
-- Under Insurance.Premium enter the criteria
<> [Carrier].[Premium]



'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
R

Rachael

Ahhh! Perfect! Thank you SO much for such a quick and clear reply! You have
MADE MY DAY!

Rachael Wilkins


John Spencer said:
SELECT *
FROM Insurance INNER JOIN Carrier
ON Insurance.SSN = Carrier.SSN
WHERE Insurance.Premium <> Carrier.Premium

In the query grid
-- add both tables
-- drag from SSN to SSN to set up the relationship
-- Add the fields you want to see
-- Under Insurance.Premium enter the criteria
<> [Carrier].[Premium]



'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================

I want to create a query to compare two tables (my insurance premium billing
list vs carrier billing list) and return records where the billing amounts
are different for the same employee. I think I'm making this more complicated
than it needs to be.

Both tables have fields SSN and Premium. I want to see where SSN matches,
but Premium does not.

Can you help?
 

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