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
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: