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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:38:59+00:00 2026-05-26T16:38:59+00:00

For example, you have a simple table with just one column. ie. CREATE TABLE

  • 0

For example, you have a simple table with just one column.
ie.

CREATE TABLE movies   (title VARCHAR2(255 BYTE))

set up with the following data:

INSERT INTO movies   (title) VALUES ('Scream');
INSERT INTO movies   (title) VALUES ('Blair Witch');
INSERT INTO movies   (title) VALUES ('Friday the 13th');
INSERT INTO movies   (title) VALUES ('Scary Movie');
INSERT INTO movies   (title) VALUES ('Hide and Seek');
INSERT INTO movies   (title) VALUES ('Alien vs Predator');

Is there a single query or PL/SQL that will do the following dynamically (ie without having to manually do a “UNION select ‘scream’ from dual…” for every value)?

Obviously this query is wrong but you get the idea:

Select * from movies
where title in (
'Scream',
'Scary Movie',
'Exorcist',
'Dracula',
'Saw',
'Hide and Seek'
)

Desired result being a record for every value in the “WHERE TITLE IN” clause where the record is not present in the table.
ie.

'Exorcist'
'Dracula'
'Saw'
  • 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-26T16:39:00+00:00Added an answer on May 26, 2026 at 4:39 pm

    If you’re using 10g or higher, you can build a function which converts a CSV string into a dynamic table. Check out the code for a string tokenizer in this other response.

    You would use it like this:

    select * from movies
    where title NOT in (
             select * 
              from table (string_tokenizer
                          (
                              'Scream, Scary Movie,Exorcist,Dracula,Saw,Hide and Seek'
                            )
    
                      )
         )
    /
    

    Here is a slightly simpler implementation which doesn’t require any additional infrastructure:

    SQL> select * from table(sys.dbms_debug_vc2coll('Scream',
    'Scary Movie',
    'Exorcist',
    'Dracula',
    'Saw',
    'Hide and Seek'
     ))
    /
      2    3    4    5    6    7    8  
    COLUMN_VALUE
    --------------------------------------------------------------------------------
    Scream
    Scary Movie
    Exorcist
    Dracula
    Saw
    Hide and Seek
    
    6 rows selected.
    
    SQL> 
    

    This is similar to the Table Value Constructor, but it does only work for single column “tables”.

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

Sidebar

Related Questions

I have a simple question related to one-line programming. First an example: function test(a)
My query is based on the following example I have table say 'Table1'. Table1
Here is a simple example: Assume I have a customer table that has a
For example I have a simple class like public class Person{ public int Age
i have simple regular expression: ^123$ Matches are for example 123 1234 etc. How
I have seen simple example Ajax source codes in many online tutorials. What I
I have this simple example I can't seems to get working : MERGE INTO
I have some simple shell scripting tasks that I want to do For example:
I have a simple marker annotation for methods (similar to the first example in
Does anyone have a simple example of implementing an async validation rule in csla?

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.