Based on 23,423 pieces, intercept the field ' Abdecsdsadsadsad ' to ab/dec/sdsa/ds/ads output

Source: Internet
Author: User

Create or Replace procedure p_getstring (p_finalstring out varchar2, p_rulestring in number, p_sourcestring in    VARCHAR2) as V_num number:=1;    V_resoucenum number:=1;    V_getnum number;    V_getsting VARCHAR2 (2000);    V_errorstring exception;     V_errorrule exception;begin If Length (p_sourcestring) < then raise v_errorstring;        else p_finalstring:= ';                     Loop V_getnum: = substr (p_rulestring, V_num, 1);   --Get the numbers from rule v_getsting: = substr (p_sourcestring, V_resoucenum, v_getnum);                        --according to the rule number to get the short String v_resoucenum: = V_resoucenum + v_getnum;                                                      -The number of the next short string start position v_num: = V_num + 1; P_finalstring: = P_finalstring| | V_getsting| | '                /‘; --Splice The short string to the final string dbms_output.put_line (V_resoucenum);         If substr (p_rulestring, V_num, 1) is null then exit;        End If;         End Loop;         if (v_resoucenum-1) < or (v_resoucenum-1) > Raise v_errorrule;         End If;    P_finalstring: = substr (p_finalstring, 1, Length (p_finalstring)-1);    End If;  Exception when v_errorstring then p_finalstring:= ' The String length was less than 18! ';  When V_errorrule then p_finalstring:= ' The sum value of the rule numbers less than or more then 18! ';    When others and then p_finalstring:= ' others wrong '; End p_getstring;

  

Based on 23,423 pieces, intercept the field ' Abdecsdsadsadsad ' to ab/dec/sdsa/ds/ads output

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.