I am trying to create a trigger for a new table (X) which pulls data from an existing view(Y). (Table Y being a replica of view X)
I am aware of creating trigger to pull data from a view to its own base table.
As of now I inserted data from Y to X using insert into statement. I need to set a trigger on Y, such that an update/insert on Y is reflected on X as well.
This is what I am trying to do:
create trigger TableUpdate on X
instead of insert, update as
Begin
insert into Y
select * from inserted
end
This looks like it updates only its base tables and not an external table.