Quantcast
Channel: Answers for "Reducing values in one table until reserves depleted in another - recursion?"
Browsing all 8 articles
Browse latest View live

Answer by Matt Whitfield

I don't think this is possible in a truly set based manner - because the fact that you have more than one PartnerID value in the ValuesToReduce table makes it an iterative process. Is there any way...

View Article



Answer by jjerome

An interesting question, but I don't think you can do it with as a set-based solution. Even if you could, I'm not sure you would want to. Any solution you could come up with will almost certainly look...

View Article

Answer by dr.lijenjin

Thanks guys. I ended up writing something similar to Andomar's solution here http://stackoverflow.com/questions/1564917/reducing-values-in-one-table-until-reserves-depleted-in-another-recursionI'll try...

View Article

Answer by Adam Haines

Here is a set based approach.DECLARE @ValsToReduce TABLE( ValsToReduceId INT, PartnerID INT, Value NUMERIC(9,2) ); INSERT INTO @ValsToReduce VALUES (1,1,53.15); INSERT INTO @ValsToReduce VALUES...

View Article

Answer by Matt Whitfield

I don't think this is possible in a truly set based manner - because the fact that you have more than one PartnerID value in the ValuesToReduce table makes it an iterative process. Is there any way...

View Article


Answer by jjerome

An interesting question, but I don't think you can do it with as a set-based solution. Even if you could, I'm not sure you would want to. Any solution you could come up with will almost certainly look...

View Article

Answer by dr.lijenjin

Thanks guys. I ended up writing something similar to Andomar's solution here http://stackoverflow.com/questions/1564917/reducing-values-in-one-table-until-reserves-depleted-in-another-recursionI'll try...

View Article

Answer by Adam Haines

Here is a set based approach.DECLARE @ValsToReduce TABLE( ValsToReduceId INT, PartnerID INT, Value NUMERIC(9,2) ); INSERT INTO @ValsToReduce VALUES (1,1,53.15); INSERT INTO @ValsToReduce VALUES...

View Article

Browsing all 8 articles
Browse latest View live




Latest Images