0
votes

I'm a newbie to Access 2010 sql query and need help on the finding a value in the string, if found add the value to another field.

I have a field called Object Name has values like '1110 Ind Lbr - Training', '8510 - Admin/Meeting', 'Ind Lbr-Equip Cal/Maint' we have to find keywords which are part of the string respectively like "Training", " Admin/Meeting" , "Equip cal/Maint" and the resultant output update the keywords into another field called Description which initially will be blank column. Both the fields are in the same table

1
Are you familiar with the LIKE operator in Access SQL? - Gord Thompson
HangUp: No there is no only one possible match of a specific keyword in th [Object Name]. Ex.[Object Name] will contain '1110 Ind Lbr - Training' and or '1110 Ind Lbr - Admin/Meeting' and never '1110 Ind Lbr - Training - Amdin/Meeting'. If the keyword "Training' or 'Admin/Meeting', 'Equip Cal/Maint' is found anywhere in the [Object Name] then the respective keyword itself shoyls go into [Description]. Thank you very much for the help. - user3094480

1 Answers

0
votes

Executed the Select statement

SELECT m.[object name],k.keywords FROM tbMain AS m INNER JOIN tbKeywords AS k ON m.[object name] ALike '%' & k.Keywords & '%';

[Object Name] [Keywords]

1110 Ind Lbr - Training Training 1110 INd Lbr - WCE WCE 8510 MFG Indirect- SAFETY Direct

For 8510 MFG Indirect Lbr - SAFETY I'm supposed to get the keyword as Safety but I get is as Direct.

This is a massive help with the solution given. Thanks