Oracle:查找并替换 varchar 字段中的 html 实体
我试图在 varchar 字段中查找 html 实体(例如 ü):
set define off;
SELECT description FROM descriptions WHERE contains(description, 'ü') > 0;
SELECT description FROM descriptions WHERE contains(description, 'ü') > 0;
SELECT description FROM descriptions WHERE contains(description, '%uuml%') > 0;
set define off;
set escape on;
SELECT description FROM descriptions WHERE contains(description, '\ü') > 0;
SELECT description FROM descriptions WHERE contains(description, '\ü') > 0;
SELECT description FROM descriptions WHERE contains(description, '\ü\;') > 0;
尽管有很多潜在的结果,但没有一个查询有效。 有什么想法吗? 非常感谢!
I'm trying to find html entities (e.g. ü) within a varchar field:
set define off;
SELECT description FROM descriptions WHERE contains(description, 'ü') > 0;
SELECT description FROM descriptions WHERE contains(description, 'ü') > 0;
SELECT description FROM descriptions WHERE contains(description, '%uuml%') > 0;
set define off;
set escape on;
SELECT description FROM descriptions WHERE contains(description, '\ü') > 0;
SELECT description FROM descriptions WHERE contains(description, '\ü') > 0;
SELECT description FROM descriptions WHERE contains(description, '\ü\;') > 0;
Not a single query is working, although there are plenty of potential results.
Any ideas?
Many thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否在
description
上定义了 Oracle Text 索引?如果是这样,您是如何定义该索引的?加载数据后是否重新同步索引?如果您使用
INSTR
而不是CONTAINS
,您会得到结果吗?Did you define an Oracle Text index on
description
? If so, how did you define that index? Did you resynchronize the index after loading the data?If you use
INSTR
rather thanCONTAINS
, do you get results?