Hi guys,
I am writing a trigger for a table, I am not sure should i use table level or row level triggers, but it keeps popup error message like" Couldn't change new values for this type of trigger". I don't have idea why?
My problem is to update two related prices once one of them is updates.
I wrote:
CREATE TRIGGER update_sell_price
after UPDATE (of Buy_price) ON part for each row
Declare
newprice number;
BEGIN
select sell_price into newprice from part
where

ld.buy_price <>:new.buy_price;
:new.sell_price: = myprice * :new.buy_price/

ld.buy_price;
END update_sell_price;
/
Could you help me clarify it? Thanks a lot!