Linking Tables with similar words

sloshake

New member
Local time
Today, 11:42
Joined
Dec 2, 2003
Messages
9
I have two tables that will have the company name as the joining keys. However, the same company may be entered slightly different (maybe Inc vs Incorporated or such). Is it possible to join these and have Access determine with a 90% certainty or so that they are same thing?

THanks.
 
You can absolutely join the tables, but how well they match up is really going to be a function of the company names themselves.

What you need is a non-equijoin. Equijoins are the typical type of join where you drag from one table to another in a query and you get a "join line".

To do a join that's based on something other than equality, you can use things Operators like Between, Like, >, <, and a particularly good one for you: Instr().

For example, say Table1 has field CompanyName and Table2 has field CoName. Add both tables to a query. Then add CompanyName to the query grid. In the criteria line, try an expression like this:
Like [Table2].[CoName] & *.*
See how many matches that gets you. You can then try it the other way around, using CoName in the grid and
Like [Table1].[CompanyName] & *.* as the criteria.

If the Like operator doesn't get you what you need, you can try using the Instr() function. Follow the same procedure as above, using CompanyName in the grid and using this as the criteria:
Instr(1,[Table2].[CoName],[Table1].[CompanyName])>0
Check the syntax on that since I'm writing it from memory and I haven't done it in a while. You can then try combining that first Instr() function with another one on another criteria line:
Instr(1,[Table1].[CompanyName],[Table2].[CoName])>0
 
Cool! Thanks for the help. I'll give these a try.
 

Users who are viewing this thread

Back
Top Bottom