Solved

Creating categories for key words in strings

Posted on 2012-04-02
2
254 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

733 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