Solved

How to match fields from two tables

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

776 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