Oracle查询-在选择字段中仅获取字符串 [英] Oracle Query - Get only strings in the select field
本文介绍了Oracle查询-在选择字段中仅获取字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
也许这听起来有些疯狂,但是我需要提出一个查询以仅从字母数字字段中检索字母.
Maybe this sounds a little bit crazy, but I need to come up with a query to retrieve only letters out of an alphanumeric field.
例如:
表
1234ADD
3901AC
1812OPA
82711AUU
TABLE
1234ADD
3901AC
1812OPA
82711AUU
预期结果
添加
AC
OPA
AUU
RESULTS EXPECTED
ADD
AC
OPA
AUU
谢谢!
推荐答案
看起来您只想删除数字.您可以使用 REGEXP_REPLACE
对于10g或11g:
Looks like you only want to remove numbers. You can use REGEXP_REPLACE
for that in 10g or 11g:
SELECT REGEXP_REPLACE( your_column, '[0-9]*', '' ) FROM your_table;
这篇关于Oracle查询-在选择字段中仅获取字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文