如何在具有Microsoft Access的备注字段中查找单词 [英] How to find words in a memo field with microsoft access

查看:122
本文介绍了如何在具有Microsoft Access的备注字段中查找单词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这比我想的要复杂,因为我需要使用VBA.所以这是我的问题:-

This is more complex than I thought as I need to do it with VBA. So here is my problem:-

我在MS Access DB中有两个表,内容和形容词.

I have two tables in an MS Access DB, content and adjectives.

内容表在备注字段(内容)和空白文本字段(形容词)中有5,000多个文本片段行. 形容词表中有120个带形容词(形容词)的形容词.

The content table has over 5,000 text snippet rows in a memo field (content) and a blank text field (adjective). The adjectives table has 120 adjectives with the field (adjective).

我需要检查文本片段是否包含任何形容词,如果包含,则将形容词添加到形容词字段中.如果有多个形容词,只需添加第一个.

I need to check if the text snippet contains any of the adjectives and if so, add the adjective to the adjective field. If there is more than one adjective just add the first one.

以下是数据示例:-

内容

"N8相机非常出色,仅凭它就能使N8取得完整的销售成功吗?这是手机的唯一哇"因素,但其他具有720p的手机也非常出色,例如Sony Vivaz家庭成员拥有的影片也很棒."

"The N8 camera is pretty amazing, will it bring the N8 full on sales success though alone? It's the only "wow" factor of the handset but other handsets have 720p that are also very good such as the Sony Vivaz which a family member has and the videos are pretty amazing from it too."

目标

害怕
同意
逗乐了
古代
很棒
生气
no恼
焦虑
傲慢
羞愧
一般
糟糕
不好
美丽
等等

afraid
agreeable
amused
ancient
amazing
angry
annoyed
anxious
arrogant
ashamed
average
awful
bad
beautiful
etc

在更新查询中还是在VBA中,我该怎么做?

How would I go about doing this is an update query or in VBA?

预先感谢您的帮助.

乔纳森

推荐答案

也许:

SELECT a.Adjectives, b.Content
FROM A, B
WHERE b.Content Like "*" & a.[adjectives] & "*"

要更新第三个表:

INSERT INTO C (ContentID, ContentAdjective) 
SELECT b.ID, a.Adjectives
FROM A, B
WHERE b.Content Like "*" & a.[adjectives] & "*"

这篇关于如何在具有Microsoft Access的备注字段中查找单词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆