|
-
This is potentially a dangerous piece of code since this will work recursively (fire the trigger from inside the trigger).
What you should do is write a before insert/update trigger and set the new value for the columns, e.g.
...
v_column1 := NULL;
v_column2 := NULL;
select column1, column2
into v_column1, v_column2
from tableb
where idno = :new.idno;
IF v_column1 IS NOT NULL THEN
:new.column1 := v_column1;
END IF;
IF v_column2 IS NOT NULL THEN
:new.column2 := v_column2;
END IF;
....
I hope you get the idea now.
Thanks.
Syed
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|