Thursday, 5 September 2013

recalculate values each time I have new radiation line

recalculate values each time I have new radiation line

This is a very complicated situation for me and I was wondering if someone
can help me with it:
Here is my table:
>`Record no Type Solde SQLCalculatedPmu DesiredValues
2570088 Insertion 60 133 133
2636476 Insertion 67 119,104 119,104
2636477 Insertion 68 117,352 117,352
2958292 Insertion 74 107,837 107,837
***3148350 Radiation 73 107,837 107,83***
3282189 Insertion 80 98,401 98,395
3646066 Insertion 160 49,201 49,198
3783510 Insertion 176 44,728 44,725
3783511 Insertion 177 44,475 44,472
4183663 Insertion 188 41,873 41,87
4183664 Insertion 189 41,651 41,648
***4183665 Radiation 188 41,651 41,64***
4183666 Insertion 195 40,156 40,145
4183667 Insertion 275 28,474 28,466
4183668 Insertion 291 26,908 26,901
4183669 Insertion 292 26,816 26,809
4183670 Insertion 303 25,842 25,836
4183671 Insertion 304 25,757 25,751
` In my table every value in the SQLCalculatedPmu column or desiredValue
Column is calculated based on the preceding value.
As you can see, I have calculated the SQL calculated PMU column based on
the round on 3 decimals. The case is that on each line radiation, the
client want to start the next calculation based on 2 decimals instead of
3(represented in the desired values column). Next values will be
recalculated. For example line 6 will change as the value in line 5 is now
on 2 decimals. I could handle this if there where one single radiation but
in my case I have alot of Radiations and in this case they will change all
based on the calculation of the two decimals.
I m using an oracle DB and I m the owner so I can make procedures, insert,
update, select... But I m not familiar with procedures or loops
Any help Regards,

No comments:

Post a Comment