ucreate or replace trigger v_customer_ii
uinstead of insert on v_customer
udeclare
u v_cust_id
customer.cust_id%rowtype;
ubegin
u if :new.name_tx is not null then
u insert into customer (cust_id,name_tx)
u
values(object_seq.nextval, :new.name_tx)
u returning cust_id into
v_cust_id;
u if :new.street_tx is not null then
u insert into address (addr_id,street_tx,
u state_cd,
postal_cd, cust_id)
u values
(object_seq.nextval,:new.street_tx,
u
:new.state_cd,:new.postal_cd, v_cust_id);
u end if;
uend;