Selecting records with similar values in 2 different fields

P

Pim

I'm trying to set up query to select all companies where
the owner's name is a part of or similar to the name of
the company.

Table contains 3 columns: unique identifier, company name,
company owner's name.

I came up with:
In (SELECT [Company Name] FROM [Company table] As Tmp
GROUP BY [Company Name],[Company Owner] HAVING Count(*)>1
And [Company Owner] = [Company Table].[Company Owner])

But results aren't satisfactory: results match my
criteria, but there are many companies that also match the
criteria which are not found...

Suggestions??
 
J

John Spencer (MVP)

SELECT [Company Name], <List of fields desired>
FROM [Company Table]
WHERE [Company Name] Like "*" & [Company Owner] & "*"
 

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