updating / inserting into a VARRAY element of a table
Hi all,
I'm trying to create a procedure that would update my varray in a table. The table consists of an id field, some personal details like name, surname, address, and a collection type phones varray(3) of varchar(15), that is a field in the table.
Here's my procedure :
create or replace procedure add_phone_num( person_id integer, phone_no varchar )
as
lvr phones;
begin
select p.tel into lvr from people p where p.id_details = person_id;
if ( lvr.count = 1 ) and ( lvr(1) like 'none' ) then
update the(select p.tel from people p where p.id_details = person_id)
set column_value = phone_no;
end if;
end;
( the tel field is the name of the phones varray column )
the procedure compiles without errors, but when I try to execute it like :
exec add_phone_num(1,'643-12-12');
I get an ORA-25015: cannot perform DML on this nested table view column error.
What am I doing wrong ?
Message was edited by:
user600378