I have an object which is a ROWTYPE from a table and need to recover some of the columns to an array list.
For example:
The ROWTYPE contents Name1, Last_Name1, Id1, Adress1...Name25,Last_Name25,Id25,Adress25 in columns.
I need to know if I can recover them by a dynamic way with a loop to an array type like this:
Name(1-25),Last_Name(1-25),Id(1-25),Adress(1-25).
Given a simplified example of the problem with the table:
I am assuming, that to get the
%ROWTYPEvariable, you are using something like:Rather than trying to dynamically access the
%ROWTYPErecord, why do you not bypass the problem and separate the values in theSELECTstatement usingUNPIVOTin a cursor and then you can use%ROWTYPEon the cursor (rather than the table):db<>fiddle here