Solved

How to match fields from two tables

Posted on 2007-03-18
4
766 Views
Last Modified: 2012-05-12
Hi All,

I exported an excel spreadsheet into the database. The excel spreadsheet has been converted into a table called Sales, this table has a field called SalesArea. I also have another table in the database called SalesSummary with field called SalesArea as well.

The fields should match each other, but the person maintaining the spreadsheet has slightly misspelled some data in the SalesArea field from the Sales table.

How can I identify the records that do not match for the field SalesArea from both tables?

Thanks
0
Comment
Question by:jose11au
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 8

Assisted Solution

by:infolurk
infolurk earned 250 total points
ID: 18746528
Create a find unmatched query. It is an option when you create a new query. It has a wizard that guides you through.
Otherwise, the sql would look something like;
SELECT Sales.SalesArea
FROM Sales LEFT JOIN SalesSummary  ON Sales.SalesArea = SalesSummary.SalesArea
WHERE (((SalesSummary.SalesArea) Is Null));

Cheers
Steve
0
 
LVL 42

Accepted Solution

by:
dqmq earned 250 total points
ID: 18746536
Select  sales.* From sales
where sales.salesarea not in
(select salessummary.salesarea from salessummary)



0
 

Author Comment

by:jose11au
ID: 18746760
Thanks guys. Both answers work OK.

I'll split the point.

Regards.
0
 
LVL 8

Expert Comment

by:infolurk
ID: 18752907
No worries.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question