<legend id='qUyYa'><style id='qUyYa'><dir id='qUyYa'><q id='qUyYa'></q></dir></style></legend>
    <tfoot id='qUyYa'></tfoot>
    1. <small id='qUyYa'></small><noframes id='qUyYa'>

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

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

        oracle中如何将csv转换为表格

        时间:2023-09-20
        <tfoot id='kV7LW'></tfoot>
            <bdo id='kV7LW'></bdo><ul id='kV7LW'></ul>

              <tbody id='kV7LW'></tbody>

              <legend id='kV7LW'><style id='kV7LW'><dir id='kV7LW'><q id='kV7LW'></q></dir></style></legend>

              • <small id='kV7LW'></small><noframes id='kV7LW'>

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

                  本文介绍了oracle中如何将csv转换为表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如何制作一个包,在传入 csv 值时以表格格式返回结果.

                  How can I make a package that returns results in table format when passed in csv values.

                  select * from table(schema.mypackage.myfunction('one, two, three'))
                  

                  应该返回

                  one
                  two
                  three
                  

                  我尝试了 问汤姆,但这只适用于 sql 类型.

                  I tried something from ask tom but that only works with sql types.

                  我使用的是 oracle 11g.有内置的东西吗?

                  I am using oracle 11g. Is there something built-in?

                  推荐答案

                  以下作品调用它作为select * from table(splitter('a,b,c,d'))

                  The following works invoke it as select * from table(splitter('a,b,c,d'))

                  create or replace function splitter(p_str in varchar2) return  sys.odcivarchar2list
                  is
                  v_tab sys.odcivarchar2list:=new sys.odcivarchar2list();
                  begin
                  with cte as (select level  ind from dual
                  connect by 
                  level <=regexp_count(p_str,',') +1
                  )
                  select regexp_substr(p_str,'[^,]+',1,ind)
                  bulk collect into v_tab
                  from cte;
                  return v_tab;
                  end;
                  /
                  

                  这篇关于oracle中如何将csv转换为表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何在 Oracle SQL Developer 中使用变量? 下一篇:ORA-00918: 列在 SELECT * 中定义不明确

                  相关文章

                  <legend id='QKHQ4'><style id='QKHQ4'><dir id='QKHQ4'><q id='QKHQ4'></q></dir></style></legend>

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

                  2. <tfoot id='QKHQ4'></tfoot>
                      <bdo id='QKHQ4'></bdo><ul id='QKHQ4'></ul>