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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:38:34+00:00 2026-06-05T17:38:34+00:00

I have 2 types: CREATE OR REPLACE TYPE id_type AS OBJECT ( id NUMBER(19,

  • 0

I have 2 types:

   CREATE OR REPLACE TYPE id_type AS OBJECT
   (
     id NUMBER(19, 0)
   );

   CREATE OR REPLACE TYPE id_table AS TABLE OF id_type;

And I have a function A(param IN id_table).

Now, if I have another function using first one, how am I supposed to pass the param like that A(SELECT 1 FROM DUAL)? Can I only do it manually creating an id_table var, filling it and then passing to A() function?

  • 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-05T17:38:36+00:00Added an answer on June 5, 2026 at 5:38 pm

    You can do something like

    DECLARE
      l_ids     id_table;
      l_return  <<data type>>;
    BEGIN
      SELECT id_type( 1 )
        BULK COLLECT INTO l_ids
        FROM dual;
      l_return := a( l_ids );
    END;
    

    It’s not obvious, though, why you have an id_type in this case. It would seem more logical to simply declare id_table

    CREATE OR REPLACE TYPE id_table
        AS TABLE OF NUMBER(19,0);
    

    It’s also not obvious whether you are really intending to populate the collection by selecting from dual. If you really want to have a single-element collection, you can simply initialize it. I’m guessing, however, that you really intend to populate the collection by querying a table other than DUAL in which case you’d prefer the BULK COLLECT

    DECLARE
      l_ids     id_table := new id_table( id_type( 1 ) );
      l_return  <<data type>>;
    BEGIN
      l_return := a( l_ids );
    END;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I have a user defined type: CREATE OR REPLACE TYPE TEST_TYPE AS OBJECT
I have function some_func_1 which will create an object of type some_type and will
i have a type as follows: CREATE OR REPLACE TYPE tbusiness_inter_item_bag AS OBJECT (
Let's say I have a user defined table type: create or replace type SrcCodeTbl
I have created this type: create or replace type PRODTABLE as table of PROD_OBJ;
I have nested table xxx_nested_table in Oracle CREATE OR REPLACE TYPE xxx_tab AS TABLE
I have my own type: CREATE TYPE MyType AS TABLE ( foo INT )
I am trying to create some simple polygons in openGL3.3. I have 2 types
I am developing a application to create chart. I have two types of Queries.
I have this method call: public DataTemplate Create(Type type, string propertyName) { string str

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.