Build a like query based on information contained in another table

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

I'm trying to build a query that will allow me to search a list of data to
see if any of the searches in a table are similar to information contained in
a column of another table. For example, table one if a list of 10000
searches that contains peoples names and sometimes birthdays. Table 2 has a
list of names I want to find if they exist in table 1. If I do a join it
only gives me the exact matches so it doesn't return anything with a
birthday. How do I write the query to return the exact matches and the like
matches. Thanks
 
Edit the join criteria.

SELECT Table1.*
FROM Table1 INNER JOIN Table2
ON Table1.Column1 LIKE Table2.Column1 & "*"

Better would be to split out the birthday data into a separate column if you can.

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 
Back
Top