Solved

Creating categories for key words in strings

Posted on 2012-04-02
2
252 Views
Last Modified: 2012-04-02
Hello Experts,

I would like to build out a query that assigns a pre-designated category to a string based on a keyword found in that string.

Attached is an example with two tables. One is a Message table with a string field called TheMessage. The other table is called Category_Fields in which there is one field called "Message_contains" and a field called "Categories".

The Message_contains field has the keyword "chunk" that would correspond to a particular category assigned in the Categories field.

In the end I would like to create a query that included all the fields in the Message table joined with the Categories field in the Category_Fields table that is associated with the keyword found in the message.

If that is less than clear I think the attached database should be self-explanatory.
String-Categorization.mdb
0
Comment
Question by:nbotts
2 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 500 total points
ID: 37798571
Try this for your query:

SELECT TheName, TheDate, TheTime,TheMessage,Categories, Message_contains
FROM Messages, category_fields
WHERE TheMessage Like "*" & [message_contains] & "*"
0
 

Author Closing Comment

by:nbotts
ID: 37798651
Frustrating how easy you experts make it look. Works perfect, thanks much.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
TRIM a textbox value MS Access 10 23
Sending email from List Data 2 51
Auto Filter in Combo Box 7 31
Would like Regex to return a string array with no duplicates. 3 27
Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now