Hello all,
i have those two tables:
ID TIP CON PRO
100000 1 2824,8 2824,8
200000 1 336,59 336,59
300000 1 26587,44 19909,59
400000 1 4800 4800
AND second table (table where we need to update 1 collum)
Year round ID Bill con pro
2011 7 100000 1855 598,98 0
2011 7 100000 1856 1144,8 0
2011 7 100000 1857 927,72 0
2011 7 100000 1858 153 0
Ok tables are set. What i need to do is take Value PRO from table 1 for example under ID 100000 and update table 2 under same ID.
But each time i update row by row (under same ID) i should deduct one value from BILL collum. For example like this:
2824,8 <- starting with this number
2225,82 <- after updating BILL 1855
1081,02 <- after updating BILL 1856
.
.
.
and so on till i reach 0 (i shouldnt reach negative number ... so ZERO is last number that can be UPDATED)
Ok i hope i made it clear ... my English is bad and its really hard for me to explain what the problem is.
If anyone care to help you are very welcome to do so ... and ask away if you need more detailed explanation!
Thank you!
Edited by: Cain_oracle on 25.7.2011 3:54