Home Forums SQL Server 2014 Development - SQL Server 2014 Based on Dates and Running Totals, need to pull records in middle of table RE: Based on Dates and Running Totals, need to pull records in middle of table
lk4772
Ten Centuries
Points: 1030
More actions
March 23, 2017 at 9:11 pm
#1934679
Ok, so I figured it out in case anyone else comes across this post LOL the last line of the Where clause for Outer Apply L should be
AND (O2.Running_Total - F.Running_Total) + F.Order_Qty >= R.Qty_Needed