| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
|  |  | |||
Home -> Community -> Usenet -> c.d.o.tools -> Re: trouble on trigger
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';
Sent via Deja.com
http://www.deja.com/
Received on Fri Dec 15 2000 - 05:15:28 CST
|  |  |