Here's my problem:
I have to transform something like this
Into this in the same table
I've tried triggers but I have mutating issues, I have no control about the inserts but I need to do that for every row with value larger than 1. Any sugestions?
You need to use view and instead of trigger.
create table testing_trig (c char(1), i integer);
create or replace view testing_trig_view as select * from testing_trig;
insert into testing_trig_view values ('A', 3);
Depending on the number of transactions you're looking at, it may not be a feasible approach, but you might try something along these lines: