Hello,
I have an Object Type and assigned the VARRAY to the Object type.
I want to loop through the Object type and below is the procdural I performed but not sure sure whether the approach is correct.
CREATE OR REPLACE TYPE ASSET_REC_TYPE IS OBJECT (asset_number VARCHAR2(120));
CREATE OR REPLACE TYPE TEST_ASSET_REC_TBL IS VARRAY(1000) of ASSET_REC_TYPE
PROCEDURE ADD_TO_ASSET(
p_asset_number_list IN TEST_ASSET_REC_TBL,
p_ord_number IN Varchar2,
x_error_flag OUT Varchar2,
x_error_msg OUT Varchar2
)
BEGIN
IF p_lot_number_list.COUNT>0 THEN
FORALL indx IN p_asset_number_list.FIRST..p_asset_number_list .LAST
LOOP
SELECT p_asset_number_list (indx).asset_number INTO var_lot_num FROM p_asset_number_list ;
END LOOP;
END IF;
Please help me to go into the Looping scenario.