从 oracle 文本字段中提取 8 个单词
Extracting 8 words from oracle text field
我在从 oracle 文本中提取 8 个单词时遇到一些问题 field.There 从字符串开头提取 10 个单词没有问题,但我想在此“(”之后提取 10 个单词 character.My查询如下。
select substr(title,instr(title,'(',1),1,10) from tablename;
示例数据如下
160722-N-QI061-651 阿拉伯湾(2016 年 7 月 22 日)一架 F/A-18E 超级大黄蜂分配给攻击战斗机中队 (VFA) 的响尾蛇
我使用下面提到的 method/queries
解决了我的问题
update tablename set title2=replace(substr(title,1,instr(title,' ',1,20)),substr(title,1,instr(title,')',1)),'')
update tablename set title2='999 '||' '||title2;
select replace(substr(title2,1,instr(title2,' ',1,11)),'999','') from tablename;
我在从 oracle 文本中提取 8 个单词时遇到一些问题 field.There 从字符串开头提取 10 个单词没有问题,但我想在此“(”之后提取 10 个单词 character.My查询如下。
select substr(title,instr(title,'(',1),1,10) from tablename;
示例数据如下
160722-N-QI061-651 阿拉伯湾(2016 年 7 月 22 日)一架 F/A-18E 超级大黄蜂分配给攻击战斗机中队 (VFA) 的响尾蛇
我使用下面提到的 method/queries
解决了我的问题update tablename set title2=replace(substr(title,1,instr(title,' ',1,20)),substr(title,1,instr(title,')',1)),'')
update tablename set title2='999 '||' '||title2;
select replace(substr(title2,1,instr(title2,' ',1,11)),'999','') from tablename;