Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Create Trigger on Materialized View

gladyvillaJul 18 2014 — edited Jul 21 2014

HI,

I am using below version:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

PL/SQL Release 11.2.0.1.0 - Production

I created a materialized view below query:

CREATE MATERIALIZED VIEW FSG1_FUND000

PCTFREE 5 PCTUSED 70

TABLESPACE users

STORAGE (INITIAL 500K NEXT 500K)

Refresh fast start with (sysdate) next (sysdate+(1/1440))

WITH rowid

AS

SELECT * FROM ABNDEV_T24.FSG1_FUND000@abndev;

From this Mview if any insert or update only (NO DELETE) are happen that should be copy to another table. But in mView trigger doesn't work.

So pls advice me any alternate solution.

Trigger querys:

create or replace trigger trg_dummy

after insert or update on FSG1_FUND000

for each row

begin

if inserting then

insert into FSG1_FUND001 (RECID,XMLRECORD) values (:new.RECID, :new.XMLRECORD);

elsif updating then

insert into FSG1_FUND001 (RECID,XMLRECORD) values  (:new.RECID, :new.XMLRECORD);

end if;

end;

/

Regards,

villa

This post has been answered by gladyvilla on Jul 21 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 18 2014
Added on Jul 18 2014
3 comments
3,558 views