|
Hi Erman,
Are you familiar with triggers, I have two schemas/users. HR_USER owns a table called DUMMY_PERSON and HRPERSAL_USER owns a table called DUMMY_PER_GEN_DET.
I'm trying to create a trigger that will update table DUMMY_PERSON whenever there's a new insert in a column called PERSALNO on table DUMMY_PER_GEN_DET.
I'm getting an error which says table or view doesn't exist, but I granted HRPERSAL_USER update and insert privileges on table DUMMY_PERSON.
This is my code:
create or replace TRIGGER DUMMY_HRPERSAL_TRIGGER AFTER INSERT OR UPDATE ON DUMMY_PER_GEN_DET FOR EACH ROW WHEN (new.R_INDICATOR = '0')
BEGIN INSERT INTO DUMMY_PERSON (PERSALNO,COL_SEQ) VALUES (:new.PERSALNO,DUMMY_HRPERSAL_SEQ.NEXTVAL); END;
Is there some which maybe I didn't include in my code?
Thanks
|