Re: trouble on trigger
From: <roger_ag_at_my-deja.com>
Date: Fri, 15 Dec 2000 11:15:28 GMT
Message-ID: <91cuge$kto$1_at_nnrp1.deja.com>
END;
/
>
Date: Fri, 15 Dec 2000 11:15:28 GMT
Message-ID: <91cuge$kto$1_at_nnrp1.deja.com>
As most of the others mentioned before: at this time CASE is not supported within PL/SQL.
Therefore you have to rewrite your trigger...
CREATE OR REPLACE TRIGGER EXCHG_RATE
AFTER UPDATE ON CURRENCY
FOR EACH ROW
BEGIN
UPDATE price
SET sell_price =
DECODE(extra_cost_currency
,'IDR',ROUND(((25* cost_price) + extra_cost_price) * (1+(margin_percentage/100)),-3) ,ROUND(((25* cost_price) + (25* extra_cost_price)) * (1+(margin_percentage/100)),-3))WHERE cost_price_currency = 'USD';
END;
/
>
Sent via Deja.com
http://www.deja.com/
Received on Fri Dec 15 2000 - 12:15:28 CET