Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / May 2006

Tip: Looking for answers? Try searching our database.

How to lookup on part of the word?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fonlil - 13 May 2006 18:44 GMT
I need to look up part of a word againts a list of words.

Example:
- Table 1 contains a list of keywords:
Keyword 1 = Smith
Keyword 2 = Brice
- Table 2 contains data
Record 1 = Antonio Smith John
Record 2 = Mary Glen Smith
Record 3 = Anna Brice
- Table 3 should contain
Antonio Smith John = Smith
Mary Glen Smith = Smith
Anna Brice = Brice

Thnks in advance for your help
Ofer Cohen - 13 May 2006 19:28 GMT
Try this SQL, change the names of the fields and table to yours

SELECT TableName.KeyWord, TableName1.FullName
FROM TableName, TableName1
WHERE TableName1.FullName In (Select M1.FullName From TableName1 As M1 Where
M1.FullName Like "*" & [KeyWord] & "*")

Signature

Good Luck
BS"D

> I need to look up part of a word againts a list of words.
>
[quoted text clipped - 12 lines]
>
> Thnks in advance for your help
John Spencer - 13 May 2006 22:59 GMT
Alternative formulation

SELECT Table2.*
FROM Table2 INNER JOIN Table1
  on Table2.FieldName LIKE "*" & Table1.Keyword & "*"

> Try this SQL, change the names of the fields and table to yours
>
[quoted text clipped - 23 lines]
> >
> > Thnks in advance for your help
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.