Hello.
I have this code:
declare
cursor cur_table is select * from my_table;
TYPE table_ty IS TABLE of cur_table%ROWTYPE;
table_rec table_ty;
begin
open cur_table;
fetch cur_table
bulk collect into table_rec;
close cur_table;
…
End;
Now that table_rec is populated, is there a function where I can search it for a particular record? I know I can loop through it using the .FIRST and .LAST attributes; however, this table will be quite large. I am wondering if a method exists where I can search for a record. If this were an Oracle table, I could simply do something like "select from table_rec where dept_name = ‘FINANCE’.
Not sure is something similar to this exists for PL/SQL tables. Thanks in advance for any guidance on this.
Dennis