Solved

How to match fields from two tables

Posted on 2007-03-18
4
767 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

617 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