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.
Oracle Database

Avatar of undefined
Last Comment
xbox360dp

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
slightwv (䄆 Netminder)

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
xbox360dp

ASKER
Much more simple!
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck