inserting with INSERT INTO THE / nested tables
Hello
I kindly ask for help on the following issue - I have 2 tables as follows :
create or replace type t_skill(...)
create table skills of t_skill;
create or replace type tt_skills as table of REF t_skill;
create or replace type t_humanoid(
(...),
humanoid_skills tt_skills
);
create table humanoids of t_humanoid(
(...)
) nested table humanoid_skills store as humanoid_skills_storage;
alter table humanoid_skills_storage add( scope for(t_skill) is skills);
So, the entries of the second table have a nested table of references to the first table.
The first table is already filled. Now, I create an entry in the second table, but leave the nested table in the particular row of creation empty. Now, when there is an entry, I want to add something to it's nested table field like :
insert into the(select x.humanoid_skills from humanoids x where x.id_field = 1)
select ref(z) from skills z where z.name like 'RUNNING';
but get an error ORA-22908 about trying to access a null value in a table.
I used google and perhaps found a sollution ( http://oratip.com/ORA-22908.html ), I'm just not sure how to 'apply the answer' - could somebody explain that to me step by step ?
Thanks in advance.