Subject | Multitable view update |
---|---|
Author | ricolebo1 |
Post date | 2005-10-20T07:56:25Z |
Hi,
I try to update a multitable view by trigger
and I obtain a strange result (firebird 1.5)
Here is a example :
create view my_view (
v_id integer,
v_name varchar(100),
v_externalfield integer)
)
as
select t1.id,t1.name,(select t2.externalfield from t2) from t1
trigger
...
if (new.v_externalfield <> old.v_externalfield) then
update t2 set t2.externalfield =new.v_externalfield;
after the update the third field of t1=externalfield value !!
(by example t1.firstname = externalfield)
In fact I want to add external fields in my table and work
with the wiew as a table.
Thank you
Eric Gueguiniat
I try to update a multitable view by trigger
and I obtain a strange result (firebird 1.5)
Here is a example :
create view my_view (
v_id integer,
v_name varchar(100),
v_externalfield integer)
)
as
select t1.id,t1.name,(select t2.externalfield from t2) from t1
trigger
...
if (new.v_externalfield <> old.v_externalfield) then
update t2 set t2.externalfield =new.v_externalfield;
after the update the third field of t1=externalfield value !!
(by example t1.firstname = externalfield)
In fact I want to add external fields in my table and work
with the wiew as a table.
Thank you
Eric Gueguiniat