Link to home
Start Free TrialLog in
Avatar of xbox360dp
xbox360dp

asked on

How to use trigger code for a single update statement?

Gurus,

I need to take some code I wrote in a trigger and update existing data.

Trigger:

create or replace
TRIGGER exchange_experts_question BEFORE
  INSERT OR
  UPDATE ON PRS FOR EACH ROW

Begin

If
:new.prsvf14c in ('1','00','0',null) and to_char(:new.prsprsc/100,'999.99') like '%.00'
    Then
      :NEW.PRSVF19C := '$'||FLOOR(TO_CHAR(:NEW.PRSPRSC/100,'fm999.00'));
END IF;
END;

How would I take this code and update the existing data with this criteria?

Procedure?

Any help would be great.
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of xbox360dp
xbox360dp

ASKER

Much more simple!