• <bdo id='yvr1G'></bdo><ul id='yvr1G'></ul>

    1. <small id='yvr1G'></small><noframes id='yvr1G'>

      1. <legend id='yvr1G'><style id='yvr1G'><dir id='yvr1G'><q id='yvr1G'></q></dir></style></legend>

        <tfoot id='yvr1G'></tfoot>
        <i id='yvr1G'><tr id='yvr1G'><dt id='yvr1G'><q id='yvr1G'><span id='yvr1G'><b id='yvr1G'><form id='yvr1G'><ins id='yvr1G'></ins><ul id='yvr1G'></ul><sub id='yvr1G'></sub></form><legend id='yvr1G'></legend><bdo id='yvr1G'><pre id='yvr1G'><center id='yvr1G'></center></pre></bdo></b><th id='yvr1G'></th></span></q></dt></tr></i><div id='yvr1G'><tfoot id='yvr1G'></tfoot><dl id='yvr1G'><fieldset id='yvr1G'></fieldset></dl></div>

        Oracle Regexp 用空格替换 、 和

        Oracle Regexp to replace , and with space(Oracle Regexp 用空格替换 、 和 )

            <bdo id='xlJUp'></bdo><ul id='xlJUp'></ul>
            <i id='xlJUp'><tr id='xlJUp'><dt id='xlJUp'><q id='xlJUp'><span id='xlJUp'><b id='xlJUp'><form id='xlJUp'><ins id='xlJUp'></ins><ul id='xlJUp'></ul><sub id='xlJUp'></sub></form><legend id='xlJUp'></legend><bdo id='xlJUp'><pre id='xlJUp'><center id='xlJUp'></center></pre></bdo></b><th id='xlJUp'></th></span></q></dt></tr></i><div id='xlJUp'><tfoot id='xlJUp'></tfoot><dl id='xlJUp'><fieldset id='xlJUp'></fieldset></dl></div>
              <tfoot id='xlJUp'></tfoot>
                <tbody id='xlJUp'></tbody>
            • <legend id='xlJUp'><style id='xlJUp'><dir id='xlJUp'><q id='xlJUp'></q></dir></style></legend>
            • <small id='xlJUp'></small><noframes id='xlJUp'>

                  本文介绍了Oracle Regexp 用空格替换 、 和 的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我试图从包含换行符 (NL) 的表中选择一列(可能还有其他 ).我想使用 REGEXP 来选择数据并用空格"替换(仅这三个)字符.

                  I am trying to select a column from a table that contains newline (NL) characters (and possibly others , , ). I would like to use the REGEXP to select the data and replace (only these three) characters with a space, " ".

                  推荐答案

                  不需要正则表达式.这可以通过 ASCII 代码和无聊的旧 TRANSLATE() 轻松完成

                  No need for regex. This can be done easily with the ASCII codes and boring old TRANSLATE()

                  select translate(your_column, chr(10)||chr(11)||chr(13), '    ')
                  from your_table;
                  

                  这将用空格替换换行符、制表符和回车符.

                  This replaces newline, tab and carriage return with space.

                  TRANSLATE() 比它的正则表达式更有效.但是,如果您决定采用这种方法,您应该知道我们可以在正则表达式中引用 ASCII 代码.所以这个语句是上面的正则表达式版本.

                  TRANSLATE() is much more efficient than its regex equivalent. However, if your heart is set on that approach, you should know that we can reference ASCII codes in regex. So this statement is the regex version of the above.

                  select regexp_replace(your_column,  '([x0A|x0B|`x0D])', ' ')
                  from your_table;
                  

                  调整是以十六进制而不是基数 10 引用 ASCII 代码.

                  The tweak is to reference the ASCII code in hexadecimal rather than base 10.

                  这篇关于Oracle Regexp 用空格替换 、 和 的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to redirect the output of DBMS_OUTPUT.PUT_LINE to a file?(如何将 DBMS_OUTPUT.PUT_LINE 的输出重定向到文件?)
                  How do I get column datatype in Oracle with PL-SQL with low privileges?(如何使用低权限的 PL-SQL 在 Oracle 中获取列数据类型?)
                  Get a list of all functions and procedures in an Oracle database(获取 Oracle 数据库中所有函数和过程的列表)
                  Why cannot I create triggers on objects owned by SYS?(为什么我不能在 SYS 拥有的对象上创建触发器?)
                  Returning result even for elements in IN list that don#39;t exist in table(即使对于表中不存在的 IN 列表中的元素也返回结果)
                  Reset Sequence in oracle 11g(oracle 11g 中的重置序列)

                    <bdo id='WfhB1'></bdo><ul id='WfhB1'></ul>
                    <legend id='WfhB1'><style id='WfhB1'><dir id='WfhB1'><q id='WfhB1'></q></dir></style></legend>
                        <tbody id='WfhB1'></tbody>
                      <tfoot id='WfhB1'></tfoot>
                          • <i id='WfhB1'><tr id='WfhB1'><dt id='WfhB1'><q id='WfhB1'><span id='WfhB1'><b id='WfhB1'><form id='WfhB1'><ins id='WfhB1'></ins><ul id='WfhB1'></ul><sub id='WfhB1'></sub></form><legend id='WfhB1'></legend><bdo id='WfhB1'><pre id='WfhB1'><center id='WfhB1'></center></pre></bdo></b><th id='WfhB1'></th></span></q></dt></tr></i><div id='WfhB1'><tfoot id='WfhB1'></tfoot><dl id='WfhB1'><fieldset id='WfhB1'></fieldset></dl></div>

                            <small id='WfhB1'></small><noframes id='WfhB1'>