Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: trouble on trigger

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@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 - 05:15:28 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US