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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:53:41+00:00 2026-06-10T02:53:41+00:00

I am having a declaration as shown below type respond_field IS record ( provider_id

  • 0

I am having a declaration as shown below

type respond_field
IS
  record
  (
    provider_id          VARCHAR2(100),
    provider_name        VARCHAR2(100));

type respond_field_group
IS
  TABLE OF respond_field INDEX BY BINARY_INTEGER;

I have created an variable for respond_field_group and i have populated values for this virtual table.
My prblem is how to i can convert/transfer this virtual table to a cursor.

What i have tried is show below respond_values is variable of respond_field_group

OPEN v_result_cursor for SELECT provider_id FROM TABLE (Cast(respond_values AS respond_field));

But i am getting invalid datatype

Please help me out to find a solution for this problem

  • 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-10T02:53:42+00:00Added an answer on June 10, 2026 at 2:53 am

    You cannot use pl/sql types like this, only sql types (i.e. types defined at schema level not at package or procedure level). Record and associative array (index by table) are pl/sql types. Instead you have to create appropriate object types and use them in your code, for example:

    SQL> create type respond_field as object
      2  (
      3    provider_id   varchar2(100),
      4    provider_name varchar2(100)
      5  )
      6  /
    
    Type created.
    
    SQL> create type respond_field_group as table of respond_field
      2  /
    
    Type created.
    
    SQL> create or replace function test_fun return respond_field_group as
      2    l_rfgroup respond_field_group := respond_field_group();
      3  begin
      4    l_rfgroup.extend(2);
      5    l_rfgroup(1) := respond_field('abc', '123');
      6    l_rfgroup(2) := respond_field('def', '456');
      7    return l_rfgroup;
      8  end;
      9  /
    
    Function created.
    
    SQL> select * from table(test_fun);
    
    PROVIDER_ID     PROVIDER_NAME
    --------------- ---------------
    abc             123
    def             456
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having some problems with this piece of code. I've included a class declaration
I have two classes, shown below: [Serializable] [XmlInclude(typeof(SomeDerived))] public class SomeBase { public string
I have a sign in button as shown below and when I try to
Having this wait declaration: public final native void wait(long timeout) throws InterruptedException; It could
Below is the CSS template I am using for my site. I'm just having
I'm trying to add an instance declaration in Haskell for a new data type
I'm having issues getting a PDF to display properly in IE. Below is the
I am trying to download a file while having the status shown in a
I'm having some trouble with some struct typedef declarations in a header file not
Having searched a whole lot of similair posts, workarounds, I decided to make my

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.