Go Back   Access World Forums > Microsoft Access Discussion > Queries

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 11-10-2019, 05:47 AM   #1
mohitmm
Newly Registered User
 
Join Date: Jan 2015
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
mohitmm is on a distinguished road
How to update a column in table by matching partial keywords in another table

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

mohitmm is offline   Reply With Quote
Old 11-10-2019, 06:39 AM   #2
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 5,722
Thanks: 57
Thanked 1,260 Times in 1,241 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: How to update a column in table by matching partial keywords in another table

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
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is online now   Reply With Quote
Old 11-10-2019, 07:59 AM   #3
Micron
AWF VIP
 
Join Date: Oct 2018
Location: Ontario, Canada
Posts: 1,050
Thanks: 10
Thanked 208 Times in 197 Posts
Micron has a spectacular aura about Micron has a spectacular aura about
Re: How to update a column in table by matching partial keywords in another table

I think what is wanted is the keyword from a longer word
Quote:
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.

__________________
Sometimes I just roll my eyes out loud...
Windows 10; Office 365 (Access 2016)

Last edited by Micron; 11-10-2019 at 08:00 AM. Reason: added comment
Micron is offline   Reply With Quote
Old 11-10-2019, 08:55 AM   #4
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 5,722
Thanks: 57
Thanked 1,260 Times in 1,241 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: How to update a column in table by matching partial keywords in another table

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...

__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is online now   Reply With Quote
Reply

Tags
ms access , ms access 2013 , ms access update , queries

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Column from other table displays default value even with no matching record? AccessAllowed Queries 4 04-09-2014 09:42 AM
Matching text from a table to another and update fg80hun Queries 1 10-09-2012 01:37 PM
Update Query - Update Duplicate value from Single Matching value from another table xxx Queries 4 06-14-2011 11:28 PM
matching on partial data in another table's field russi General 3 08-11-2010 05:31 AM
How to find records, name "like" keywords given in column in another table erxefera Queries 2 02-08-2006 07:06 AM




All times are GMT -8. The time now is 08:06 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World