Solved

Creating categories for key words in strings

Posted on 2012-04-02
2
256 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

696 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