What to use to Exclusively Compare Tables

jlex

New member
Local time
Yesterday, 20:27
Joined
Mar 8, 2006
Messages
9
I have company names in 2 tables to compare, but the data is slightly different but same companies. I want to know what companies are in one table but not in another. Here's an example:

Company Name in Table 1 = Virtual Micro
Company Name in Table 2 = Virtual Micro Technologies

Same company, but the spreadsheet I imported for Table 2 had the full name for the company, so therefore they are not compared the same and the query result shows them to be different.

Do they have to be exactly the same, or can I compare a certain number of characters or somehow use the "like" criteria filter?

Jen
 
Yes,there are two ways to do this. You can create a column in your query called join like this Join: Left([TableName].[NameOfCompany],10)

Then in the criteria row of that column put this Left([OtherTableName].[NameOfCompany],10).

OR

You are going to have to make 3 seperate quires. First make a query from table one with all of the pertenant columns and make a column called join. Use the Left function in the join column to retrieve a specifed nuber of letters. The join column should look like this...

Join: Left([NameOfCompany],10)

NameOfCompany being the name of the field that contains the company name


After you are finished making that query save it and make a query similar for table two.

Now make a query from the two queries you just created making a join on the join columns in the two queries.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom