How can I transfer this Source_table that has D (must) records:
ID MOV IMPORTE CLASE
1 1 100.00 D
2 1 200.00 D
3 1 50.00 D
4 2 450.00 D
5 2 80.00 D
6 3 30.00 D
7 3 50.00 D
8 3 70.00 D
And that in the new Target_table for each Mov insert a total, in this way:
ID MOV IMPORTE CLASE
1 1 100.00 D
2 1 200.00 D
3 1 50.00 D
4 1 350.00 H
5 2 450.00 D
6 2 80.00 D
7 2 530.00 H
8 3 30.00 D
9 3 50.00 D
10 3 70.00 D
11 3 150.00 H
I am preparing a MySQL table and as I see it, I may have to do several steps.