How to use trigger code for a single update statement?

xbox360dp
xbox360dp used Ask the Experts™
on
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.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Distinguished Expert 2018
Commented:
>>How would I take this code and update the existing data with this criteria?

Why not just update the table and let the trigger fire?

Something like:
update some_table set prsvf14c=prsvf14c, prsprsc=prsprsc;

Author

Commented:
Much more simple!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial