Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I used a cursor and bulk collect into varray but dont know how to display all columns of varray,
Posted
Comments
John C Rayan 7-Jul-15 8:51am    
Can you post your code here? Why do you need an array with multiple columns in first place?
Member 11796194 7-Jul-15 9:36am    
Code :


declare
type abc is varray(4) of a%rowtype;
v1 abc;
cursor c1 is select * from a;
l_display a%rowtype;

begin
v1 := abc();
for rec in c1
loop
v1.extend();
fetch c1 bulk collect into v1 ;

end loop;
l_display := v1.first();
while l_display is not null
loop
dbms_output.put_line(v1(l_display));
l_display:= v1.next(l_display);
end loop;
end;

i need to display all the columns that was fetched from cursor to varray.
This was one of the method which i tried.Although this code gave me a error.Please suggest any other method to display the columns of varray.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900