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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:11:53+00:00 2026-05-13T22:11:53+00:00

I wanted to see what some suggested approaches would be to validate a field

  • 0

I wanted to see what some suggested approaches would be to validate a field that is stored as a CSV against a table containing appropriate values. Althought it would be desired, it is NOT an option to split the CSV list into another related table. In the example data below I would be trying to capture the code 99 for widget A.

Below is an example data representation.

Table: Widgets

WidgetName   WidgetCodeList
A            1, 2, 3
B            1
C            2, 3
D            99

Table: WidgetCodes

WidgetCode  
1
2
3

An earlier approach was to query the CSV column as rows using various string manipulations and CONNECT_BY_LEVEL however the performance was not acceptible.

  • 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-05-13T22:11:53+00:00Added an answer on May 13, 2026 at 10:11 pm

    You could try a pipelined function (here with a lateral join):

    SQL> WITH widgets AS (
      2     SELECT 'A' WidgetName, '1, 2, 3' WidgetCodeList FROM dual
      3     UNION ALL SELECT 'B', '1' FROM DUAL
      4     UNION ALL SELECT 'C', '2, 3' FROM DUAL
      5     UNION ALL SELECT 'D', '99' FROM DUAL
      6  ), widgetcodes AS (
      7     SELECT ROWNUM widgetcode from dual CONNECT BY LEVEL <= 3
      8  )
      9  SELECT w.widgetname,
     10         to_number(s.column_value) missing_widget
     11    FROM widgets w
     12         CROSS JOIN TABLE(demo_pkg.string_to_tab(w.WidgetCodeList)) s
     13   WHERE NOT EXISTS (SELECT NULL
     14                       FROM widgetcodes ws
     15                      WHERE ws.widgetcode = to_number(s.column_value));
    
    WIDGETNAME MISSING_WIDGET
    ---------- --------------
    D                      99
    

    See this other SO for an example of a pipelined function that converts a character string to a table.

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

Sidebar

Related Questions

Im making an application in cocoa and wanted to see if some strings in
I been playing around with my code and I wanted to see what would
Since I wanted to drop some tables and somebody suggested the below and I
I had some old code i wanted to see if I could do with
So I came across some code that I thought looked kind of strange. Wanted
So I was playing around with some code and wanted to see which method
I've been learning C# and wanted to review some open source projects to see
Today I wanted to unlock the WP7 emulator in order to see some more
I am trying to see some features availability in prime-faces..... I wanted to know
Wanted to see if anyone knows how to add props to a image with

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.