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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:12:59+00:00 2026-06-11T15:12:59+00:00

New to SQL. Using oracle sql developer Version 3.1.07. Is there any way to

  • 0

New to SQL. Using oracle sql developer Version 3.1.07. Is there any way to separate elements of a string column that contains a string like:

dublin.ie;montreal.com;paris.com

I want to split them based on the ; so that I can manipulate them individually (and do so for every row of the table). This is because I want to delete everything that ends in .com but not effect the rest.

I want to use the most basic sql I can, as I am quite the newbie and I’m using quite an old version.

Any ideas? Thanks again you guys. The help so far has been great.

  • 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-11T15:13:00+00:00Added an answer on June 11, 2026 at 3:13 pm

    I’d say the table is badly structured – there should be a row for each domain. That is going to make a solution very difficult for a beginner.

    You need a piece of sql that will create a row for each domain stored in the ; separated list.

    so dublin.ie;montreal.com;paris.com;bristol.uk

    becomes:-

    dublin.ie
    montreal.com
    paris.com 
    bristol.uk
    

    and then bind the rows that don’t have .com back into a single row, to get

    dublin.ie; bristol.uk
    

    I had a similar issue – I has a field that contained comma separated country codes.
    The report user I was working for wanted country names. I had a COUNTRY table that contained Country Code and Country Name, but the comma separated list wouldn’t join to it, as it has “GB,FR,IT” where the country table has “GB” for “Great Britain” and so on.

    I solved this by creating a row (in memory) for each of the comma separated values, joining these rows to the COUNTRY table, returning the names of the countries, and then bound the country name back into a single line, like this:-

    “Great Britain, France, Italy”.

    Here’s the code I used – it’s not for beginners, though. You might want to try using REPLACE and INSTR and SUBSTR, but you’ll need to know in advance how many entries each field contains, otherwise you’ll probably need to work within loops, using PLSQL.

    If i were you, I’d ask the DBA (if it is possible) to structure the data properly so that the fields contain atomic values, not arrays of values.

    SELECT ROW_SPLIT.CONTRACT_ID,
        WM_CONCAT(ROW_SPLIT.COUNTRY_NAME) AS COUNTRY_LIST
      FROM
        (SELECT PQ.ID AS CONTRACT_ID,
          PQ.COUNTRY_CODE,
          COUT.TEXT AS COUNTRY_NAME
        FROM
          (SELECT ID,
            extract(value(d), '//row/text()').getStringVal() AS COUNTRY_CODE
          FROM
            (SELECT ID,
              XMLTYPE('<rows><row>'
              || REPLACE(EXCLUDED_NATIONALITIES, ',', '</row><row>')
              || '</row></rows>') AS xmlval
            FROM PROPERTY_CONTRACT
            ) x,
            TABLE(xmlsequence(extract(x.xmlval, '/rows/row'))) d
          ) PQ
        JOIN COUNTRY C
        ON C.CODE = PQ.COUNTRY_CODE
        LEFT OUTER JOIN TEXT COUT
        ON C.CODE         = COUT.CODE
        AND COUT.CATEGORY = 'COUNTRY'
        AND COUT.LANGUAGE = 'en'
        ORDER BY PQ.ID,
          COUT.TEXT
        ) ROW_SPLIT
      GROUP BY ROW_SPLIT.CONTRACT_ID;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm quite new to PL/SQL, and am using Oracle SQL Developer to write a
I'm new to using Oracle SQL Developer and to using an Oracle DB (have
I am new to Oracle. I have been using SQL-Server for the past 3
using Visual.Web.Developer.2010.Express; using SQL.Server.Management.Studio.2008.R2; Kinda new at C# here.. I got the first row
I'm an experienced programmer, but relatively new to SQL. We're using Oracle 10 and
When using an Oracle JDBC connection pool, is there a way to control how
I'm a c# SQL Server developer new to Oracle programming . The code below
I'm using SQL Developer for Oracle 11g.. I need to be able to loop
I'm using SQL Developer for Oracle 11g.. I need to be able to loop
I've been using the Oracle SQL Developer Data Modeler to create a relational model

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.