I did something similar to this a couple of years ago. The requirement was that when a record was inserted into a table if it was a duplicate record (based on the PK) then the record would be updated instead of insert.

What we had to do was create a view of the base table and create an INSTEAD OF trigger on the view. Inside the INSTEAD OF trigger I performed an insert into the base table. If the insert failed because of a DUP_VAL_ON_INDEX exeption, I updated the base table via the PK with the new values. Then, I inserted data into the view.