Joining Similar Data in a query

M

MaryH

I need to be able to join data that is similar though not exact. The data is
street address - some of the recoreds are Street vs St, some are 125 Main St
vs 125 Main. I know it won't be perfect but I was hoping to gain more
matches - is there any way that this can be done?

Thanks
 
M

Michel Walsh

No, not right out of the box.


You can imply a VBA function, defined in a standard module, which will
return true, or false, accordingly to the logic you will add in it.


SELECT a.address, b.address
FROM table1 AS a INNER JOIN table2 AS b
ON AreTheyAlike( table1.address, table2.address)
ORDER BY a.address, b.address



Sure, you have to add the logic, yourself, in the function (here, I called
it AreTheyAlike, it takes two strings and, hopefully, return a Boolean
value, true, or false... I assume there is no possible NULL).





Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top