Solved

Creating categories for key words in strings

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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.

746 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

13 Experts available now in Live!

Get 1:1 Help Now