HELP! Comparing tables, please.=)

cvaccess

Registered User.
Local time
Today, 08:16
Joined
Jun 27, 2002
Messages
48
I am trying to compare tables and it is comparing within the table in addition to the NEW and the OLD table. For example, a family is listed in the tables like this:

NEW table
subsc_num last_name
123456789 hubert
123456789 hubert
123456789 smith

OLD table
subsc_num last_name
123456789 hubert
123456789 hubert
123456789 smith

The below query pulls the "smith" record since it looks at the last name within the tables. How can I get this query to pull when they two tables don't match?

SELECT DISTINCTROW NEW.*
FROM NEW INNER JOIN OLD ON NEW.SUBSC_NUM = OLD.SUBSC_NUM
WHERE (((NEW.LAST_NAME)<>[OLD]![LAST_NAME]));

Please help. Thank you.
 
I'm not sure if this is what you are looking for, but maybe try this.

Use the query wizard and choose 'Find Unmatched Query Wizard' then join your 'SUBSC_NUM' on your NEW table and OLD table. Then you can select the fields that you want to display.

Hope this helps.
 
Try using the "find unmatched query wizard" when creating a new query, Access will guide you through the steps, it is quite simple.
 
Sorry, I didn't see the previous reply.... :)
 

Users who are viewing this thread

Back
Top Bottom