Hi all,
I need to evalauate 1+.5(1+.3(1+.7))etc. The .5 will be at the top most elements value, the .3 is its child's value and .7 is the childs value. When a new value .8 comes beneath .7 it should be 1+.5(1+.3(1+.7(1+.8))). So the simplest way is recursion.
But while using Recursion in SQL i'm getting (1+.5)*(1+.3)*(1+.7)*(1+.8). How can i achive the right result?
It seems like CTE is looping only and not doing recursion. Am i right?
Thanking you,
Binesh Nambiar C
I need to evalauate 1+.5(1+.3(1+.7))etc. The .5 will be at the top most elements value, the .3 is its child's value and .7 is the childs value. When a new value .8 comes beneath .7 it should be 1+.5(1+.3(1+.7(1+.8))). So the simplest way is recursion.
But while using Recursion in SQL i'm getting (1+.5)*(1+.3)*(1+.7)*(1+.8). How can i achive the right result?
It seems like CTE is looping only and not doing recursion. Am i right?
Thanking you,
Binesh Nambiar C