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 8431501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:52:19+00:00 2026-06-10T05:52:19+00:00

I have strings like: var = This a string, [This is another string] I

  • 0

I have strings like:

var = This a string, [This is another string]

I would like to have them broken into something like this in PLSQL

var1 = This is string
var2 = This is another string

The comma should not be included if it is like:

, [

Basically this decides if there is another string.

How can I do it?

Thanks in advance 🙂

  • 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-10T05:52:21+00:00Added an answer on June 10, 2026 at 5:52 am

    You could use a combination of SUBSTR and INSTR to split the string. For example, to obtain the first string, you can use something along these lines:

    SELECT NVL(SUBSTR(var, 1, INSTR(var, ',') - 1), var)
    FROM dual;
    

    That is, find the index of the separator (INSTR(var, ',')), and then use SUBSTR to capture everything up to that index. Same applies to the second string.

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

Sidebar

Related Questions

I have a string like this: var string = ' [United States] [Canada] [India]
Let's say I have a string like this: var str = /abcd/efgh/ijkl/xxx-1/xxx-2; How do
I have a string contaning some html markup, like this: var html = <div>
I have an ordered list like this: var list = new List<String>(){aaa,aab,aac,baa,bab,bac}; I want
I have some LINQ code that generates a list of strings, like this: var
I have strings like this: Car is blue String could also be like this:
I have a string of text like so: var foo = FooBar; I want
I have strings like these: something something [[abcd]] blah blah something something [[xyz|abcd]] blah
I have strings like this: http://localhost:2055/web-site-2009/paginas/noticias/**IGP-M recua 0,36% em agosto, aponta FGV**-46.aspx I'd like
I have a string which has a number in it that I would like

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.