PC Review


Reply
Thread Tools Rate Thread

Build a like query based on information contained in another table

 
 
Tom
Guest
Posts: n/a
 
      8th Sep 2008
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
 
Reply With Quote
 
 
 
 
John Spencer
Guest
Posts: n/a
 
      8th Sep 2008
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

Tom wrote:
> 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

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Build a query from a web-based database or a PDF file. Damian Microsoft Excel Misc 0 26th Oct 2009 01:53 PM
Displaying Information in one Table based on information in anothe Ray C Microsoft Access Getting Started 2 31st May 2008 08:54 AM
Re: Build Query Based Upon The Current Record Smartin Microsoft Access Queries 0 20th Jan 2007 01:38 AM
Build Table Index Based on a field value? saraqpost@yahoo.com Microsoft Access 1 1st Sep 2006 09:57 PM
getting information contained in the design table to an excel spreadsheet jimh Microsoft Excel Misc 2 2nd Feb 2004 02:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:24 PM.