Oracle Split string REGEXP_SUBSTR usage

Source: Internet
Author: User

Splits all specified characters in a string and then into multiple lines
Parameter description,
Parameter 1: string to be split
Parameter 2: Regular expression
Parameter 3: Starting position, starting with the first character of the regular expression match (default is 1)
Parameter 4: Identifies the first matching group, which defaults to 1
Parameter 5: The pattern (' I ' is not case-sensitive for retrieval; ' C ' is case-sensitive for retrieval. The default is ' C '. )

--sample delimiter '; ', split into columnsSelectREGEXP_SUBSTR ('a;b;c;','[^;] +',1, RowNum,'C') asRegexp_strs fromDual Connect byRowNum<=Length (Regexp_replace ('a;b;c;','[^;]',NULL));

Results:

Refer to 1:oracle practical SQL to split a comma-separated string into multiple columns

Reference 2:77,864,060

Oracle Split string REGEXP_SUBSTR usage

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.