Dear Friends,
I have a table with multiple Id's. the % field has some null values. So the value in these % null fields has to be inserted. in such a way that the next value is ( difference between the upper and lower value , divided by days diff+1 ) .
I have been able to calculate the days as diff 1.
Problem Table:
ID | StartDateNQ | % | AddFactor | Diff 1 | Diff 2 | RowNo |
---|
70 | 7/22/2014 | 0 | 7.415 | X | 1 | 1 |
70 | 7/23/2014 | | | 1 | | 2 |
70 | 7/24/2014 | 14.83 | 16.67 | | 1 | 3 |
70 | 7/25/2014 | | | 1 | | 4 |
70 | 7/26/2014 | 48.17 | 15.71 | | 2 | 5 |
70 | 7/27/2014 | | | 2 | | 6 |
70 | 7/28/2014 | | | | | 7 |
70 | 7/29/2014 | 95.3 | | | X | 8 |
Required Table : (required values are color coded in red)
ID | StartDateNQ | % | AddFactor | Diff 1 | Diff 2 | RowNo |
---|
70 | 7/22/2014 | 0 | 7.415 | X | 1 | 1 |
70 | 7/23/2014 | 0+7.415 | | 1 | | 2 |
70 | 7/24/2014 | 14.83 | 16.67 | | 1 | 3 |
70 | 7/25/2014 | 14.83+16.67 | | 1 | | 4 |
70 | 7/26/2014 | 48.17 | 15.71 | | 2 | 5 |
70 | 7/27/2014 | 48.17+15.71 | | 2 | | 6 |
70 | 7/28/2014 | 48.17+15.7+15.71 | | | | 7 |
70 | 7/29/2014 | 95.3 | | | X | 8 |
Attached is the file for detail info.Please help.
Thanks,
Gizzel