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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:26:14+00:00 2026-05-27T21:26:14+00:00

How can I select from a typed set in Oracle 10g? I.E. SELECT *

  • 0

How can I select from a typed set in Oracle 10g?

I.E. SELECT * FROM (3,5,20,68,54,13,56,899,1)

Additionally, how would I filter it?

I.E. SELECT * FROM (3,5,20,68,54,13,56,899,1) WHERE > 5

  • 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-27T21:26:15+00:00Added an answer on May 27, 2026 at 9:26 pm

    Where is the data coming from and what are you planning on doing with it?

    If the data is being read from a file, you would normally create an external table to read from the file or use SQL*Loader or some other ETL tool to load the data into a staging table or a PL/SQL collection that you could then query

    SQL> create type num_tbl is table of number;
      2  /
    
    Type created.
    
    SQL> ed
    Wrote file afiedt.buf
    
      1  declare
      2    l_nums num_tbl := num_tbl( 3, 5, 20, 68, 54 );
      3  begin
      4    for x in (select * from table(l_nums))
      5    loop
      6      dbms_output.put_line( x.column_value );
      7    end loop;
      8* end;
    SQL> /
    3
    5
    20
    68
    54
    

    If you’re doing some sort of manual process, you would normally be looking for data from another table, i.e.

    SELECT *
      FROM some_other_table
     WHERE some_key IN (3, 5, 20, 68, 54, 13, 56, 889, 1 );
    

    If you’re really trying to generate a data set full of arbitrary data pulled from a file that you don’t want to use Oracle to read, you can always do a series of SELECT statements from DUAL that are all UNION ALL‘d together but this obviously gets rather cumbersome.

    WITH sample_data
      AS (SELECT 3 num FROM dual UNION ALL
          SELECT 5 FROM dual UNION ALL
          SELECT 20 FROM dual UNION ALL
          SELECT 68 FROM dual UNION ALL
          SELECT 54 FROM dual UNION ALL
          ...
          SELECT 1 FROM dual)
     SELECT *
       FROM sample_data
      WHERE num > 5;
    

    Additionally, using the WITH clause and a CSV string we can parse a string as a table.
    Example:

    VARIABLE liste VARCHAR2(100)
    
    EXECUTE :liste := '5, 25, 41, 52'; 
    
    WITH liste AS (
      SELECT SUBSTR(:liste, INSTR(','||:liste||',', ',', 1, rn),
      INSTR(','||:liste||',', ',', 1, rn+1) - 
      INSTR(','||:liste||',', ',', 1, rn)-1) valeur
    FROM (
      SELECT ROWNUM rn FROM DUAL
      CONNECT BY LEVEL<=LENGTH(:liste) - LENGTH(REPLACE(:liste,',',''))+1))
    SELECT TRIM(valeur)
    FROM liste;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Time zones can be hard to select from dozens of options. I would like
I can use: select * from sys.tables in mssql to show a list of
In SQL you can use SELECT * FROM INFORMATION_SCHEMA.TABLES etc to get information about
I have Table A. How can I select from Table A to get Table
Can I write the T-SQL like below select * FROM (select * from TableA
Can anyone explain why this query returns an empty result. SELECT * FROM (`bookmarks`)
can i perform select single node from IXMLDOMElement ,if its possible give me one
SELECT name FROM sys.databases -- this can list all database name in the server
Using MySQL , I can do something like: SELECT hobbies FROM peoples_hobbies WHERE person_id
How can I return null instead of a 'undefined' from a select element. Basically

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.