Quantcast
Channel: Questions in topic: "cte"
Viewing all articles
Browse latest Browse all 75

How to replace a SQL Server Cursor with recursive CTE ?

$
0
0

Using the example I need to calculate a value in r1 pass the value to r2, recalculate from the passed value maintaining the passed value and then pass the new value to r3. Noting that the aggregation is by column a and b. Normally I would use a cursor for this but it is not an option and having some trouble figuring it out , any help would be greatly appreciated.


Viewing all articles
Browse latest Browse all 75

Trending Articles