Query help

rynorem

Registered User.
Local time
Today, 02:07
Joined
Jan 9, 2006
Messages
27
I give up. I can't get it to work. I have two tables, one is employee address
and I have a table called City/ZIP. The city/zip table contains all the cities in Indiana with only the zip codes that apply to that city. I have found errors in the employees address table that have a wrong zip to the city that they live in. I want to write a query to have it match the cities in the two tables but only show the address, city and zip that are not in the city/zip table. I can get it to show the matches but not show the ones that are errors. It can even be a sql script if it's easier. Thanks. Boss wants it cleaned up pretty quick.
 
I think something like this should do it.

Select [Address], [City], [Zip]
From [Employee Address], [City Zip]
Where [Employee Address].[City] = [City Zip].[City]
AND [Employee Address].[Zip] <> [City Zip].[Zip];

Hope it helps.
 
have you tried the Unmatched Query wizard?
 

Users who are viewing this thread

Back
Top Bottom