Platinum Partner

Função Oracle Que Realiza Um Split Para Criação De Clausulas 'IN'

uso:  x.campo IN (SELECT COLUMN_VALUE FROM (TABLE(PKGL_UTIL.FNCL_SPLIT_STRING('1,2,3,4,5,6,7')))))  


 function FNCL_SPLIT_STRING
  (
      p_list varchar2,
      p_del varchar2 := ','
  ) return SPLIT_TBL pipelined
  is
      l_idx    pls_integer;
      l_list    varchar2(32767) := p_list;
  begin
      loop
          l_idx := instr(l_list,p_del);
          if l_idx > 0 then
              pipe row(substr(l_list,1,l_idx-1));
              l_list := substr(l_list,l_idx+length(p_del));

          else
              pipe row(l_list);
              exit;
          end if;
      end loop;
      return;
  end FNCL_SPLIT_STRING;
{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}