Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Accessing a complete collection
"So I defined a table in memory to be like a database table structure."
TYPE SomeTyp IS TABLE OF database_table%ROWTYPE
INDEX BY BINARY_INTEGER; Some_tab SomeTyp;
ind := 0
open my_cursor (seq,ordinal,v_element_list(z), state);
loop
fetch my_cursor into Some_tab(ind+1);
exit when my_cursor%notfound; ind := ind +1;
for z in 1 .. IND
loop
dbms_output.put_line(to_char(z)||' '||
Some_tab(z).name||' '|| Some_tab(z).condition||' '|| Some_tab(z).state );
end loop;
Finally The Question...
Is there a method of accessing only certain elements of the memory table
without accessing each individual row..
ie... a cursor that will
select * from memory_table
where condition
" instead of "
for z in 1 .. element_counter
loop
for t in element_counter+1 .. Some_tab.count loop if Some_tab(t).element_order = z then dbms_output.put_line(Some_tab(t).name); end if; end loop;
![]() |
![]() |