Is there any other way, other than looping the entire array, maybe using EXISTS, to find out if this array has cus_no 222?
DECLARE
TYPE cus_rec_type
IS
RECORD
(
cus_no NUMBER,
cus_name VARCHAR2(25) );
TYPE cus_tab_type
IS
TABLE OF cus_rec_type INDEX BY pls_integer;
t_cus cus_tab_type;
i PLS_INTEGER;
BEGIN
t_cus(1).cus_no := '111';
t_cus(1).cus_name := 'Jack';
t_cus(2).cus_no := '222';
t_cus(2).cus_name := 'Pete';
-------
i := t_cus.first;
WHILE i IS NOT NULL
LOOP
IF t_cus(i).cus_no = 222 THEN
DBMS_OUTPUT.PUT_LINE('Customer # 222 found');
END IF;
i := t_cus.NEXT(i);
END LOOP;
END;