Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8550455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:57:14+00:00 2026-06-11T13:57:14+00:00

Possible Duplicate: how to convert csv to table in oracle I have a query

  • 0

Possible Duplicate:
how to convert csv to table in oracle

I have a query in PL/SQL that is built to handle input in a variable as a “starts-with” filter:

WHERE product_group LIKE strProductGroup || '%'

As a new “feature”, the input variable could contain comma separated values. So, where before I would expect something like “ART”, I could now see “ART,DRM”.

I’d like to avoid building this query as a string and using EXECUTE IMMEDIATE, if possible. Can anyone think of a way to write a WHERE condition that is the equivalent of saying “starts with any of the values in a CSV list” in Oracle 10g?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T13:57:15+00:00Added an answer on June 11, 2026 at 1:57 pm

    I found another post that gave me an idea. In my specific case, the values in the input will all be 3 characters, so I can do the following:

    AND SUBSTR(product_group, 0, 3) IN
        (SELECT regexp_substr(strProductGroup, '[^,]+', 1, LEVEL)
          FROM dual
          CONNECT BY LEVEL <= length(regexp_replace(strProductGroup, '[^,]+')) + 1)
    

    I like this solution, because it does not require additional types or functions, but is pretty limited to my specific case.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: PHP code to convert a MySQL query to CSV Hi I am
Possible Duplicate: How to convert MDB to SQLite in Android I have an MS
Possible Duplicate: How to convert List<Integer> to int[] in Java? I have an ArrayList
Possible Duplicate: How can I convert a string to boolean in JavaScript? I have
Possible Duplicate: Convert some code from C++ to C I've got some code that
Possible Duplicate: C# Cannot convert from IEnumerable<Base> to IEnumerable<Derived> I have D1 and D2
Possible Duplicate: Convert multidimensional array into single array I have this array: Array (
Possible Duplicate: Convert from char* to NSString? I have char myChar = 'r' How
Possible Duplicate: Convert a number range to another range, maintaining ratio So I have
Possible Duplicate: Convert Month Number to Month Name Function in SQL Hi .... how

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.