I'm new to Oracle and having an issue deleting a value from an array. What I'm trying to: If I've got an array with 1, 2, 3, 4 I want to remove 2 once the database has dealt with this array value and then move onto 3.
The code I'm using is:
type test_rec is record (temp_id number,
pos1 number,
pos2 number,
pos3 number);
type test_array is table of test_rec index by binary_integer;
PROCEDURE pr_test (
parv_test IN test_array)
AS
BEGIN
FOR i in parv_test.first .. parv_test.last LOOP
IF parv_test(i).action_type = 'I' THEN
INSERT STATEMENT
parv_test.delete(i);
END IF;
END LOOP;
END pr_test ;
However, I get the error:
PLS-00363: expression 'parv_test' cannot be used as an assignment target
Can someone tell me where I'm going wrong?
Thanks a lot.
Cheers
Alex
parv_test IN OUT test_array