Oracle Split character ____oracle

Source: Internet
Author: User
Create or Replace function Get_strarraystrofindex
(
Av_str varchar2,--string to be split
Av_split varchar2,--Separator symbol
Av_index number--take the first few elements
)
return VARCHAR2
Is
LV_STR VARCHAR2 (1024);
Lv_strofindex VARCHAR2 (1024);
Lv_length number;
Begin
Lv_str:=ltrim (RTrim (AV_STR));
Lv_str:=concat (Lv_str,av_split);
Lv_length:=av_index;
If Lv_length=0 Then
Lv_strofindex:=substr (Lv_str,1,instr (lv_str,av_split)-length (av_split));
Else
lv_length:=av_index+1;
Lv_strofindex:=substr (Lv_str,instr (Lv_str,av_split,1,av_index) +length (Av_split), InStr (Lv_str,av_split,1,lv_ Length)-instr (Lv_str,av_split,1,av_index)-length (av_split));
End If;
return lv_strofindex;
End Get_strarraystrofindex;

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.