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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:24:14+00:00 2026-05-18T22:24:14+00:00

I have an Oracle database column, say col1, that has the following values: Col1

  • 0

I have an Oracle database column, say col1, that has the following values:

Col1 (A:B:C)

I now need to come along and add to this Col1, only if it doesn’t exist, additional values but unsure how to go about checking to see if Col1 already contains these values.

Scenario might be as follows:

1) Need to add B   => Outcome=> check Col1 – B exists, do not add.
2) Need to add A:C => Outcome=> check Col1 – A and C exists, do not add.
3) Need to add C:D => Outcome=> check Col1 – C exists but D doesn’t, do not add C but need to add D
4) Need to add G  => Outcome=> check Col1 – G doesn’t, need to add G

Using Oracle SQL or PL/SQL I am unsure how to go about processing the above to ensure whether items exist or don’t exist and whether to add or not to add to Col1

  • 1 1 Answer
  • 2 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-05-18T22:24:14+00:00Added an answer on May 18, 2026 at 10:24 pm

    This might get you started:

    UPDATE mytable
    SET Col1 = Col1 || ':A'
    WHERE INSTR(':' || Col1 || ':', ':A:') = 0;
    

    To remove a value:

    UPDATE mytable
    SET Col1 = TRIM(':' FROM REPLACE(Col1, ':A:', ':'))
    WHERE INSTR(':' || Col1 || ':', ':A:') > 0;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a Oracle 9i database and OrderDetails table which has a column to
I have the following table setup in an oracle database: Column Pk_foo1 Column Pk_foo2
I need to find all the tables in our Oracle database that have attributes
we have a table in an Oracle Database which contains a column with the
I have some files stored in a database blob column in Oracle 9. I
We have an Oracle database here that's been around for about 10 years. It's
I have 3 Oracle database instances with the same data and scheme that I
I have an Oracle database that I am connecting to with PHP OCI8. One
I have the following table in an Oracle database: InvoiceNumber InvoiceDate InvoiceCorrelative ------------- -----------
Background I have an oracle database table with a lot of columns that I'm

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.