February 15, 2018 at 1:52 pm
Why is this different from your previous post?
https://www.sqlservercentral.com/Forums/1922239/Increament-id-if-running-total-for-group-exceeds-value
February 15, 2018 at 2:00 pm
Luis Cazares - Thursday, February 15, 2018 1:52 PMWhy is this different from your previous post?
https://www.sqlservercentral.com/Forums/1922239/Increament-id-if-running-total-for-group-exceeds-value
Similar but I need the basket ID to restart. I have played around with that code but not getting it to work
March 4, 2018 at 7:39 pm
Talvin Singh - Thursday, February 15, 2018 2:00 PMLuis Cazares - Thursday, February 15, 2018 1:52 PMWhy is this different from your previous post?
https://www.sqlservercentral.com/Forums/1922239/Increament-id-if-running-total-for-group-exceeds-valueSimilar but I need the basket ID to restart. I have played around with that code but not getting it to work
There is nothing in your table to guarantee the processing order within an ID. Without such a thing, this is doomed to failure.
If the goal is to process in order by both the ascending order of both the ID and the Value, then such a thing can be done quite easily but if you're trying for something like load balancing, then that won't work.
What is this for? Load Balancing? Packing Boxes/Bins? Assigning tasks by duration? What?
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply