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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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
More Pages to Explore .....