【发布时间】:2018-09-20 21:46:09
【问题描述】:
我有一个表,其中包含这样的值。
ExpTable
+--------+
|expCol |
+--------+
|abc.abc |
|bcd.123 |
|efg.@/. |
+--------+
而我想要的是,当句号后面的字符是字母或数字时,输出会在点后面加一个空格,如下所示:
预期输出
+--------+
|expCol |
+--------+
|abc. abc|
|bcd. 123|
|efg.@/. | --the value here stays the same because after the period is not a letter/number
+--------+
我试过了:
SELECT REGEXP_REPLACE(expCol, '.', '. ') from expTable WHERE /*condition*/
正如预期的那样,包括最后一个值“efg.@/.”在内的所有内容期后有空位。我不知道在 WHERE 子句中放什么。
【问题讨论】:
标签: sql oracle oracle11g regexp-replace