【发布时间】:2018-11-29 07:25:14
【问题描述】:
我在 oracle 中名为“DATA”的列中有以下数据。我试图在每行之后删除新的空行。
-
输入
This is a text from line 1. This is text from line 2. This is a text from line 3.The line 3 ends here . This is a text from line 4.The line ends here . -
输出
This is a text from line 1. This is text from line 2. This is a text from line 3.The line 3 ends here . This is a text from line 4.The line ends here .
我尝试过使用
查询:
Select regexp_replace(regexp_replace(data,chr(13),null),chr(10),null) from main_data;
当我执行下面的查询时,输出就像一个段落。
这是第 1 行的文本。这是第 2 行的文本。这是第 3 行的文本。第 3 行到此结束。这是第 4 行的文本。行到此结束。
任何人都可以说如何实现这一目标吗?
【问题讨论】:
标签: regex oracle oracle11g regexp-replace