How to use a comma-delimited set of plsql stored procedures in Oracle (comma-delimited string to a collection)

Source: Internet
Author: User

Original:

Https://blogs.oracle.com/aramamoo/entry/how_to_split_comma_separated_string_and_pass_to_in_clause_of_select_statement

' Smith,allen,ward,jones ' is a collection of 4 values, and what needs to be handled in the stored procedure in order to achieve the effect of in (value 1, value 2, value 3, value 4);

The following methods are useful for reference: The following method is implemented by turning a comma-expression into a column of 4 rows of the collection.

Select Regexp_substr (' Smith,allen,ward,jones ', ' [^,]+ ', 1, level] from dual
Connect by Regexp_substr (' Smith,allen,ward,jones ', ' [^,]+ ', 1, level) are NOT NULL

How to use a comma-delimited set of plsql stored procedures in Oracle (comma-delimited string to a collection)

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.