?
Solved

Creating categories for key words in strings

Posted on 2012-04-02
2
Medium Priority
?
260 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 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Suggested Courses

752 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