troubleshooting Question

How to use trigger code for a single update statement?

Avatar of xbox360dp
xbox360dp asked on
Oracle Database
2 Comments1 Solution344 ViewsLast Modified:
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
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros