Oracle plsql Demo-24. Delimited String function

Source: Internet
Author: User

--Refer:--http://www.cnblogs.com/gnielee/archive/2009/09/09/1563154.html--http://www.cnblogs.com/yudy/archive/2012/07/18/2597874.htmlCREATE OR REPLACETYPE Ty_str_split is TABLE  of VARCHAR2(4000);CREATE OR REPLACE FUNCTIONSplitstr (p_stringinch VARCHAR2, P_delimiterinch VARCHAR2:= ',')    RETURNty_str_split pipelined asV_length Number:=LENGTH (p_string); V_start Number:= 1; V_index Number; V_length_delimiter Number:=LENGTH (p_delimiter);BEGIN     while(V_start<=v_length) LOOP V_index:=INSTR (p_string, P_delimiter, V_start); IFV_index= 0  Then            PIPEROW (SUBSTR (p_string, V_start)); V_start:=V_length+ 1; ELSE            PIPEROW (SUBSTR (p_string, V_start, V_index-V_start)); V_start:=V_index+V_length_delimiter; END IF; ENDLOOP; RETURN;ENDSPLITSTR;

Oracle plsql Demo-24. Delimited String function

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.