How to update a column in table by matching partial keywords in another table (1 Viewer)

mohitmm

New member
Local time
Today, 15:22
Joined
Jan 19, 2015
Messages
3
How to update a column in table by matching partial keywords in another table.. for ex :- in "tblkeyword" table we have sleep, run , walk as keywords and in another table "tblData" we have values like abcruntoday, walkman, sleeptiger words .. now how to update a column in table "tblData" .. colname "keyfield" as run for "abcruntoday" and walk for walkman.. need this in ms access i used update query but i am missing on searching keyword and can't ser value..but i have 1000 differnet keywords and 10000 rows in tblData
 

theDBguy

I’m here to help
Staff member
Local time
Today, 15:22
Joined
Oct 29, 2018
Messages
21,358
Hi. You should be able to use something like this.
Code:
UPDATE tblData
INNER JOIN tblKeywords
ON tblData.FieldName Like "*" & tblKeywords.FieldName & "*"
SET tblData.FieldName=tblKeywords.FieldName
 

Micron

AWF VIP
Local time
Today, 18:22
Joined
Oct 20, 2018
Messages
3,476
I think what is wanted is the keyword from a longer word
colname "keyfield" as run for "abcruntoday" and walk for walkman.
and that what is proposed will update the target field to the entire contents of the other field; e.g. field will get updated to abcruntoday, not run?

Then again, maybe I've interpreted the sql statement incorrectly. I'll bow out and study it a bit more.
 
Last edited:

theDBguy

I’m here to help
Staff member
Local time
Today, 15:22
Joined
Oct 29, 2018
Messages
21,358
Actually, I was slightly confused about the request as well, but decided to give it a shot anyway. We'll have to wait and see...
 

Users who are viewing this thread

Top Bottom